From f5925ac3fa0239934e5f6d131f9af1fe0139038b Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Wed, 6 Jun 2018 23:19:33 +0200 Subject: [PATCH] Bugfixing friendica shell script - update was not working for develop branch --- .bin/friendica | 7 ++++--- 2018.05/apache/bin/friendica | 7 ++++--- 2018.05/fpm-alpine/bin/friendica | 7 ++++--- 2018.05/fpm/bin/friendica | 7 ++++--- 2018.08-dev/apache/bin/friendica | 7 ++++--- 2018.08-dev/fpm-alpine/bin/friendica | 7 ++++--- 2018.08-dev/fpm/bin/friendica | 7 ++++--- 7 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.bin/friendica b/.bin/friendica index 49d95b3..3333d96 100644 --- a/.bin/friendica +++ b/.bin/friendica @@ -140,7 +140,8 @@ copy_sources() { exit 1; fi - if version_greater "$image_version" "$installed_version"; then + if version_greater "$image_version" "$installed_version" || + echo "$image_version" | grep -Eq '^.*\-dev'; then if [ "$(id -u)" -eq 0 ]; then rsync_options="-rlDog --chown=www-data:root" else @@ -148,10 +149,10 @@ copy_sources() { fi log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' - rsync $rsync_options --delete --exclude=.git --exclude=photo --exclude=proxy --exclude=.htconfig.php $SOURCEDIR/friendica/ $WORKDIR/ + rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ if [ -f $WORKDIR/view/smarty3 ]; then - chmod 777 $WORKDIR/view/smarty3 + chmod -R 777 $WORKDIR/view/smarty3 fi fi } diff --git a/2018.05/apache/bin/friendica b/2018.05/apache/bin/friendica index 49d95b3..3333d96 100644 --- a/2018.05/apache/bin/friendica +++ b/2018.05/apache/bin/friendica @@ -140,7 +140,8 @@ copy_sources() { exit 1; fi - if version_greater "$image_version" "$installed_version"; then + if version_greater "$image_version" "$installed_version" || + echo "$image_version" | grep -Eq '^.*\-dev'; then if [ "$(id -u)" -eq 0 ]; then rsync_options="-rlDog --chown=www-data:root" else @@ -148,10 +149,10 @@ copy_sources() { fi log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' - rsync $rsync_options --delete --exclude=.git --exclude=photo --exclude=proxy --exclude=.htconfig.php $SOURCEDIR/friendica/ $WORKDIR/ + rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ if [ -f $WORKDIR/view/smarty3 ]; then - chmod 777 $WORKDIR/view/smarty3 + chmod -R 777 $WORKDIR/view/smarty3 fi fi } diff --git a/2018.05/fpm-alpine/bin/friendica b/2018.05/fpm-alpine/bin/friendica index 49d95b3..3333d96 100644 --- a/2018.05/fpm-alpine/bin/friendica +++ b/2018.05/fpm-alpine/bin/friendica @@ -140,7 +140,8 @@ copy_sources() { exit 1; fi - if version_greater "$image_version" "$installed_version"; then + if version_greater "$image_version" "$installed_version" || + echo "$image_version" | grep -Eq '^.*\-dev'; then if [ "$(id -u)" -eq 0 ]; then rsync_options="-rlDog --chown=www-data:root" else @@ -148,10 +149,10 @@ copy_sources() { fi log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' - rsync $rsync_options --delete --exclude=.git --exclude=photo --exclude=proxy --exclude=.htconfig.php $SOURCEDIR/friendica/ $WORKDIR/ + rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ if [ -f $WORKDIR/view/smarty3 ]; then - chmod 777 $WORKDIR/view/smarty3 + chmod -R 777 $WORKDIR/view/smarty3 fi fi } diff --git a/2018.05/fpm/bin/friendica b/2018.05/fpm/bin/friendica index 49d95b3..3333d96 100644 --- a/2018.05/fpm/bin/friendica +++ b/2018.05/fpm/bin/friendica @@ -140,7 +140,8 @@ copy_sources() { exit 1; fi - if version_greater "$image_version" "$installed_version"; then + if version_greater "$image_version" "$installed_version" || + echo "$image_version" | grep -Eq '^.*\-dev'; then if [ "$(id -u)" -eq 0 ]; then rsync_options="-rlDog --chown=www-data:root" else @@ -148,10 +149,10 @@ copy_sources() { fi log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' - rsync $rsync_options --delete --exclude=.git --exclude=photo --exclude=proxy --exclude=.htconfig.php $SOURCEDIR/friendica/ $WORKDIR/ + rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ if [ -f $WORKDIR/view/smarty3 ]; then - chmod 777 $WORKDIR/view/smarty3 + chmod -R 777 $WORKDIR/view/smarty3 fi fi } diff --git a/2018.08-dev/apache/bin/friendica b/2018.08-dev/apache/bin/friendica index 49d95b3..3333d96 100644 --- a/2018.08-dev/apache/bin/friendica +++ b/2018.08-dev/apache/bin/friendica @@ -140,7 +140,8 @@ copy_sources() { exit 1; fi - if version_greater "$image_version" "$installed_version"; then + if version_greater "$image_version" "$installed_version" || + echo "$image_version" | grep -Eq '^.*\-dev'; then if [ "$(id -u)" -eq 0 ]; then rsync_options="-rlDog --chown=www-data:root" else @@ -148,10 +149,10 @@ copy_sources() { fi log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' - rsync $rsync_options --delete --exclude=.git --exclude=photo --exclude=proxy --exclude=.htconfig.php $SOURCEDIR/friendica/ $WORKDIR/ + rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ if [ -f $WORKDIR/view/smarty3 ]; then - chmod 777 $WORKDIR/view/smarty3 + chmod -R 777 $WORKDIR/view/smarty3 fi fi } diff --git a/2018.08-dev/fpm-alpine/bin/friendica b/2018.08-dev/fpm-alpine/bin/friendica index 49d95b3..3333d96 100644 --- a/2018.08-dev/fpm-alpine/bin/friendica +++ b/2018.08-dev/fpm-alpine/bin/friendica @@ -140,7 +140,8 @@ copy_sources() { exit 1; fi - if version_greater "$image_version" "$installed_version"; then + if version_greater "$image_version" "$installed_version" || + echo "$image_version" | grep -Eq '^.*\-dev'; then if [ "$(id -u)" -eq 0 ]; then rsync_options="-rlDog --chown=www-data:root" else @@ -148,10 +149,10 @@ copy_sources() { fi log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' - rsync $rsync_options --delete --exclude=.git --exclude=photo --exclude=proxy --exclude=.htconfig.php $SOURCEDIR/friendica/ $WORKDIR/ + rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ if [ -f $WORKDIR/view/smarty3 ]; then - chmod 777 $WORKDIR/view/smarty3 + chmod -R 777 $WORKDIR/view/smarty3 fi fi } diff --git a/2018.08-dev/fpm/bin/friendica b/2018.08-dev/fpm/bin/friendica index 49d95b3..3333d96 100644 --- a/2018.08-dev/fpm/bin/friendica +++ b/2018.08-dev/fpm/bin/friendica @@ -140,7 +140,8 @@ copy_sources() { exit 1; fi - if version_greater "$image_version" "$installed_version"; then + if version_greater "$image_version" "$installed_version" || + echo "$image_version" | grep -Eq '^.*\-dev'; then if [ "$(id -u)" -eq 0 ]; then rsync_options="-rlDog --chown=www-data:root" else @@ -148,10 +149,10 @@ copy_sources() { fi log 'Copying Friendica sources ('$image_version') from '\'$SOURCEDIR'/friendica'\'' to '\'$WORKDIR\' - rsync $rsync_options --delete --exclude=.git --exclude=photo --exclude=proxy --exclude=.htconfig.php $SOURCEDIR/friendica/ $WORKDIR/ + rsync $rsync_options --delete --exclude='.git' --exclude='photo' --exclude='proxy' --exclude='.htconfig.php' --exclude='home.*' --exclude='vendor' $SOURCEDIR/friendica/ $WORKDIR/ if [ -f $WORKDIR/view/smarty3 ]; then - chmod 777 $WORKDIR/view/smarty3 + chmod -R 777 $WORKDIR/view/smarty3 fi fi }