1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borg_ynh.git synced 2024-09-03 18:16:05 +02:00

Merge pull request #38 from ashemsay/fix/last-app-backup

fix: last listed app not being backed up
This commit is contained in:
ljf (zamentur) 2020-05-07 15:28:27 +02:00 committed by GitHub
commit e427a407f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,14 @@ fi
# Backup all apps independently # Backup all apps independently
apps=$(yunohost app setting {{ app }} apps) apps=$(yunohost app setting {{ app }} apps)
for app in $(yunohost app list --installed -b | grep id: | cut -d: -f2); do for app in $(yunohost app list --installed -b | grep id: | cut -d: -f2); do
if [[ "$apps" = *"$app,"* ]] || [ "$apps" = "all" ]; then backup_app=false
for selected_app in $(echo $apps | tr "," " ");do
if [[ "$selected_app" == "$app" ]] || [ "$apps" = "all" ]; then
backup_app=true
break
fi
done
if [ "$backup_app" == "true" ];then
yunohost backup create $ignore_system -n auto_$app --method {{ app }}_app --apps $app yunohost backup create $ignore_system -n auto_$app --method {{ app }}_app --apps $app
fi fi
done done