Browse Source
Merge pull request #170 from YunoHost-Apps/fix-168-copy-apps-correctly2
[fix] Copy only app missing in new apps dir
pull/219/head
ljf (zamentur)
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
1 deletions
-
scripts/upgrade
|
|
@ -241,7 +241,16 @@ then |
|
|
# Backup 3rd party applications from the current nextcloud |
|
|
# Backup 3rd party applications from the current nextcloud |
|
|
# But do not overwrite if there is any upgrade |
|
|
# But do not overwrite if there is any upgrade |
|
|
# (apps directory already exists in Nextcloud archive) |
|
|
# (apps directory already exists in Nextcloud archive) |
|
|
cp -a --update "$final_path/apps" "$tmpdir" |
|
|
|
|
|
|
|
|
( |
|
|
|
|
|
cd $final_path/apps |
|
|
|
|
|
for nc_app_dir in */ |
|
|
|
|
|
do |
|
|
|
|
|
if [ ! -d "$tmpdir/apps/$nc_app_dir" ] |
|
|
|
|
|
then |
|
|
|
|
|
cp -a "$nc_app_dir" "$tmpdir/apps/$nc_app_dir" |
|
|
|
|
|
fi |
|
|
|
|
|
done |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
# Replace the old nextcloud by the new one |
|
|
# Replace the old nextcloud by the new one |
|
|
ynh_secure_remove --file="$final_path" |
|
|
ynh_secure_remove --file="$final_path" |
|
|
|