1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/piwigo_ynh.git synced 2024-09-03 20:06:03 +02:00

Use ynh_abort_if_errors instead of set-eu in backup/restore scripts

This commit is contained in:
Jimmy Monin 2017-10-17 19:45:45 +02:00
parent 58220ee4a8
commit 0b68168935
2 changed files with 14 additions and 5 deletions

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
# Exit on command errors and treat unset variables as an error
set -eu
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
@ -15,6 +13,13 @@ fi
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================

View file

@ -1,8 +1,5 @@
#!/bin/bash #!/bin/bash
# Exit on command errors and treat unset variables as an error
set -eu
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -15,6 +12,13 @@ fi
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================