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

fix: last listed app not being backed up

This commit is contained in:
Lionel Coupouchetty-Ramouchetty 2020-02-23 12:23:56 +01:00
parent 437d9abf63
commit e9dc347468

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