From 7e2bfa10c435ffd31dcee805408996f907d28e79 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sun, 20 May 2018 16:34:47 +0200 Subject: [PATCH] `friendica` cli improvement `friendica update` now pulls the latest git changes of the develop-branch --- develop/apache/bin/friendica | 12 +++++++----- develop/fpm-alpine/bin/friendica | 12 +++++++----- develop/fpm/bin/friendica | 12 +++++++----- stable/apache/bin/friendica | 12 +++++++----- stable/fpm-alpine/bin/friendica | 12 +++++++----- stable/fpm/bin/friendica | 12 +++++++----- 6 files changed, 42 insertions(+), 30 deletions(-) diff --git a/develop/apache/bin/friendica b/develop/apache/bin/friendica index 8deda9e..8bad6ad 100644 --- a/develop/apache/bin/friendica +++ b/develop/apache/bin/friendica @@ -54,7 +54,8 @@ friendica_help() { # executes the Friendica console console() { cd ${WORKDIR} - php "${WORKDIR}/bin/console.php" "$@" + # Todo starting a php-executable without quoting the arguments seems not secure (but is the only way it works) + php "${WORKDIR}/bin/console.php" $@ } # executes the composer.phar binary of Friendica @@ -70,15 +71,16 @@ copy_sources() { installed_version="$(cat ${WORKDIR}/VERSION)" fi + if [ "$FRIENDICA_VERSION" = "develop" ]; then + clone_develop + fi + image_version="0.0.0.0" if [ -f ${SOURCEDIR}/friendica/VERSION ]; then image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" - elif [ "$FRIENDICA_VERSION" = "develop" ]; then - clone_develop - image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" else # no given installation and not using the developer branch => nothing to do - echo "Friendica command '$1' failed, because of no valid combination of source and version" + echo "Friendica command '$1' failed, because of no version found" return; fi diff --git a/develop/fpm-alpine/bin/friendica b/develop/fpm-alpine/bin/friendica index 8deda9e..8bad6ad 100644 --- a/develop/fpm-alpine/bin/friendica +++ b/develop/fpm-alpine/bin/friendica @@ -54,7 +54,8 @@ friendica_help() { # executes the Friendica console console() { cd ${WORKDIR} - php "${WORKDIR}/bin/console.php" "$@" + # Todo starting a php-executable without quoting the arguments seems not secure (but is the only way it works) + php "${WORKDIR}/bin/console.php" $@ } # executes the composer.phar binary of Friendica @@ -70,15 +71,16 @@ copy_sources() { installed_version="$(cat ${WORKDIR}/VERSION)" fi + if [ "$FRIENDICA_VERSION" = "develop" ]; then + clone_develop + fi + image_version="0.0.0.0" if [ -f ${SOURCEDIR}/friendica/VERSION ]; then image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" - elif [ "$FRIENDICA_VERSION" = "develop" ]; then - clone_develop - image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" else # no given installation and not using the developer branch => nothing to do - echo "Friendica command '$1' failed, because of no valid combination of source and version" + echo "Friendica command '$1' failed, because of no version found" return; fi diff --git a/develop/fpm/bin/friendica b/develop/fpm/bin/friendica index 8deda9e..8bad6ad 100644 --- a/develop/fpm/bin/friendica +++ b/develop/fpm/bin/friendica @@ -54,7 +54,8 @@ friendica_help() { # executes the Friendica console console() { cd ${WORKDIR} - php "${WORKDIR}/bin/console.php" "$@" + # Todo starting a php-executable without quoting the arguments seems not secure (but is the only way it works) + php "${WORKDIR}/bin/console.php" $@ } # executes the composer.phar binary of Friendica @@ -70,15 +71,16 @@ copy_sources() { installed_version="$(cat ${WORKDIR}/VERSION)" fi + if [ "$FRIENDICA_VERSION" = "develop" ]; then + clone_develop + fi + image_version="0.0.0.0" if [ -f ${SOURCEDIR}/friendica/VERSION ]; then image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" - elif [ "$FRIENDICA_VERSION" = "develop" ]; then - clone_develop - image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" else # no given installation and not using the developer branch => nothing to do - echo "Friendica command '$1' failed, because of no valid combination of source and version" + echo "Friendica command '$1' failed, because of no version found" return; fi diff --git a/stable/apache/bin/friendica b/stable/apache/bin/friendica index 8deda9e..8bad6ad 100644 --- a/stable/apache/bin/friendica +++ b/stable/apache/bin/friendica @@ -54,7 +54,8 @@ friendica_help() { # executes the Friendica console console() { cd ${WORKDIR} - php "${WORKDIR}/bin/console.php" "$@" + # Todo starting a php-executable without quoting the arguments seems not secure (but is the only way it works) + php "${WORKDIR}/bin/console.php" $@ } # executes the composer.phar binary of Friendica @@ -70,15 +71,16 @@ copy_sources() { installed_version="$(cat ${WORKDIR}/VERSION)" fi + if [ "$FRIENDICA_VERSION" = "develop" ]; then + clone_develop + fi + image_version="0.0.0.0" if [ -f ${SOURCEDIR}/friendica/VERSION ]; then image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" - elif [ "$FRIENDICA_VERSION" = "develop" ]; then - clone_develop - image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" else # no given installation and not using the developer branch => nothing to do - echo "Friendica command '$1' failed, because of no valid combination of source and version" + echo "Friendica command '$1' failed, because of no version found" return; fi diff --git a/stable/fpm-alpine/bin/friendica b/stable/fpm-alpine/bin/friendica index 8deda9e..8bad6ad 100644 --- a/stable/fpm-alpine/bin/friendica +++ b/stable/fpm-alpine/bin/friendica @@ -54,7 +54,8 @@ friendica_help() { # executes the Friendica console console() { cd ${WORKDIR} - php "${WORKDIR}/bin/console.php" "$@" + # Todo starting a php-executable without quoting the arguments seems not secure (but is the only way it works) + php "${WORKDIR}/bin/console.php" $@ } # executes the composer.phar binary of Friendica @@ -70,15 +71,16 @@ copy_sources() { installed_version="$(cat ${WORKDIR}/VERSION)" fi + if [ "$FRIENDICA_VERSION" = "develop" ]; then + clone_develop + fi + image_version="0.0.0.0" if [ -f ${SOURCEDIR}/friendica/VERSION ]; then image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" - elif [ "$FRIENDICA_VERSION" = "develop" ]; then - clone_develop - image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" else # no given installation and not using the developer branch => nothing to do - echo "Friendica command '$1' failed, because of no valid combination of source and version" + echo "Friendica command '$1' failed, because of no version found" return; fi diff --git a/stable/fpm/bin/friendica b/stable/fpm/bin/friendica index 8deda9e..8bad6ad 100644 --- a/stable/fpm/bin/friendica +++ b/stable/fpm/bin/friendica @@ -54,7 +54,8 @@ friendica_help() { # executes the Friendica console console() { cd ${WORKDIR} - php "${WORKDIR}/bin/console.php" "$@" + # Todo starting a php-executable without quoting the arguments seems not secure (but is the only way it works) + php "${WORKDIR}/bin/console.php" $@ } # executes the composer.phar binary of Friendica @@ -70,15 +71,16 @@ copy_sources() { installed_version="$(cat ${WORKDIR}/VERSION)" fi + if [ "$FRIENDICA_VERSION" = "develop" ]; then + clone_develop + fi + image_version="0.0.0.0" if [ -f ${SOURCEDIR}/friendica/VERSION ]; then image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" - elif [ "$FRIENDICA_VERSION" = "develop" ]; then - clone_develop - image_version="$(cat ${SOURCEDIR}/friendica/VERSION)" else # no given installation and not using the developer branch => nothing to do - echo "Friendica command '$1' failed, because of no valid combination of source and version" + echo "Friendica command '$1' failed, because of no version found" return; fi