From a0028ddf7537fff00d19906bb39966221252cba2 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Fri, 24 Feb 2017 16:33:37 +0000 Subject: [PATCH] Use of cp /. instead of /* --- scripts/install | 2 +- scripts/restore | 4 ++-- scripts/upgrade | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 7ed291b..4d6b0c4 100755 --- a/scripts/install +++ b/scripts/install @@ -119,7 +119,7 @@ SFILE=`sudo cat ../sources/source_file`; sudo wget -nv -i ../sources/source_url -O ${SFILE}.tar.gz sudo md5sum -c ../sources/source_md5 --status || (echo "Corrupt source" >&2 && false) sudo tar xvf ${SFILE}.tar.gz -C ../sources/ -sudo cp -R ../sources/$SFILE/* $final_path +sudo cp -a ../sources/$SFILE/. $final_path/ # Configuration sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" ../conf/config.php diff --git a/scripts/restore b/scripts/restore index 7c14973..8939235 100755 --- a/scripts/restore +++ b/scripts/restore @@ -24,12 +24,12 @@ final_phpconf=$(ynh_app_setting_get $app final_phpconf) # Restore sources, data and permissions sudo mkdir -p $final_path -sudo cp -a ./sources/* $final_path/ +sudo cp -a ./sources/. $final_path/ sudo chown -R www-data: $final_path # Restore statedir sudo mkdir -p $statedir -sudo cp -a ./statedir/* $statedir/ +sudo cp -a ./statedir/. $statedir/ sudo chown -R www-data:www-data $statedir # Restore logs, data & permissions diff --git a/scripts/upgrade b/scripts/upgrade index ec63a32..eff8c75 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,7 +77,7 @@ SFILE=`sudo cat ../sources/source_file`; sudo wget -nv -i ../sources/source_url -O ${SFILE}.tar.gz sudo md5sum -c ../sources/source_md5 --status || (echo "Corrupt source" >&2 && false) sudo tar xvf ${SFILE}.tar.gz -C ../sources/ -sudo cp -R ../sources/$SFILE/* $final_path +sudo cp -a ../sources/$SFILE/. $final_path/ # Configuration sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" ../conf/config.php