From dde129d9da3ed68e36415dfe204ffbd48b8f4fea Mon Sep 17 00:00:00 2001 From: whypsi Date: Wed, 15 Nov 2017 13:19:00 -0500 Subject: [PATCH] Fixes package linter requirement [YEP-2.4] ynh_abort_if_errors --- scripts/backup | 4 ++-- scripts/install | 5 ++--- scripts/restore | 3 ++- scripts/upgrade | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/backup b/scripts/backup index bf5d4ab..2fb9a6a 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,10 +1,10 @@ #!/usr/bin/env bash -set -eu - source /usr/share/yunohost/helpers main() { + ynh_abort_if_errors + local app=$YNH_APP_INSTANCE_NAME local backup_dir=$YNH_APP_BACKUP_DIR local deploy_path=$( ynh_app_setting_get $app deploy_path ) diff --git a/scripts/install b/scripts/install index b627235..ebf402d 100755 --- a/scripts/install +++ b/scripts/install @@ -1,8 +1,5 @@ #!/usr/bin/env bash -# Exit on command errors and treat unset variables as an error -set -eu - source /usr/share/yunohost/helpers source functions.sh @@ -95,6 +92,8 @@ ynh_find_port () { } main() { + ynh_abort_if_errors + local app=$YNH_APP_INSTANCE_NAME local number=$YNH_APP_INSTANCE_NUMBER local domain=$YNH_APP_ARG_DOMAIN diff --git a/scripts/restore b/scripts/restore index 42dbebf..d756691 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,5 +1,4 @@ #!/usr/bin/env bash -set -eu source /usr/share/yunohost/helpers @@ -12,6 +11,8 @@ install_dependencies() { } main() { + ynh_abort_if_errors + local app=$YNH_APP_INSTANCE_NAME local deploy_path=$(ynh_app_setting_get $app deploy_path) local symlink_to_deploy_path=$(ynh_app_setting_get $app symlink_to_deploy_path) diff --git a/scripts/upgrade b/scripts/upgrade index 2e25c64..4364ee4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,12 +1,11 @@ #!/usr/bin/env bash -# Exit on command errors and treat unset variables as an error -set -eu - source /usr/share/yunohost/helpers source functions.sh main() { + ynh_abort_if_errors + local app=${YNH_APP_INSTANCE_NAME} local user=$( ynh_app_setting_get $app user ) local deploy_path=$( ynh_app_setting_get $app deploy_path )