Be nice with set -eu

This commit is contained in:
Maniack Crudelis 2018-01-10 00:44:25 +01:00 committed by GitHub
parent 3dd6317ae6
commit 5289889174
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,10 +46,11 @@ ynh_backup() {
local SRC_PATH="$1"
local DEST_PATH="${2:-}"
local IS_BIG="${3:-0}"
BACKUP_CORE_ONLY=${BACKUP_CORE_ONLY:-0}
# If backing up core only (used by ynh_backup_before_upgrade),
# don't backup big data items
if [ "$IS_BIG" == "1" ] && [ -n "$BACKUP_CORE_ONLY" ] ; then
if [ "$IS_BIG" == "1" ] && [ "$BACKUP_CORE_ONLY" == "1" ] ; then
echo "$SRC_PATH will not be saved, because backup_core_only is set." >&2
return 0
fi