aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoryalh76 <yalh@yahoo.com>2020-07-09 00:11:40 +0200
committerGitHub <noreply@github.com>2020-07-09 00:11:40 +0200
commit61a523591137c0d817ad07d2c604cd314caf0dad (patch)
treed872ea8b7881652cec81e5be7e191b923a3842db /scripts
parentff944667eab88207ae4af40d5b128255c86aefda (diff)
parent8ccc61f08d89872ee0851ad071cb64f574fcea77 (diff)
downloadmastodon_ynh-61a523591137c0d817ad07d2c604cd314caf0dad.tar.gz
mastodon_ynh-61a523591137c0d817ad07d2c604cd314caf0dad.tar.bz2
mastodon_ynh-61a523591137c0d817ad07d2c604cd314caf0dad.zip
Merge pull request #231 from YunoHost-Apps/testing
perf(upgrade): use mv in place of rsync for system directory
Diffstat (limited to 'scripts')
-rw-r--r--scripts/upgrade6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/upgrade b/scripts/upgrade
index 6445cc8..6ed16ef 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -179,7 +179,7 @@ then
mkdir $tmpdir/system
if [ -d "$final_path/live/public/system" ]; then
- rsync -a "$final_path/live/public/system" "$tmpdir/."
+ mv --verbose --no-target-directory --backup=numbered "$final_path/live/public/system" "$final_path/system.tmp"
fi
rsync -a "$config" "$tmpdir/."
ynh_secure_remove --file="$final_path/live"
@@ -188,8 +188,8 @@ then
# Temporary workaround for https://github.com/tootsuite/mastodon/issues/13292
ynh_replace_string --match_string="sidekiq-unique-jobs (6.0.18)" --replace_string="sidekiq-unique-jobs (6.0.20)" --target_file="$final_path/live/Gemfile.lock"
- if [ -d "$tmpdir/system" ]; then
- rsync -a "$tmpdir/system" "$final_path/live/public/."
+ if [ -d "$final_path/system.tmp" ]; then
+ mv --verbose --no-target-directory "$final_path/system.tmp" "$final_path/live/public/system"
fi
rsync -a "$tmpdir/.env.production" "$final_path/live/."
ynh_secure_remove --file="$tmpdir"