From b7c060b3166d913d47bce7378b26f142d61bc8a4 Mon Sep 17 00:00:00 2001 From: jodeko Date: Thu, 16 Nov 2017 18:34:51 +0100 Subject: [PATCH] Fixes package linter test --- scripts/backup | 4 ++-- scripts/install | 8 ++------ scripts/restore | 4 ++-- scripts/upgrade | 8 ++------ 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/scripts/backup b/scripts/backup index a20dd09..6c43306 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 domain=$(ynh_app_setting_get $app domain) local path=$(ynh_app_setting_get $app path) diff --git a/scripts/install b/scripts/install index 0ad0d46..ff4641f 100755 --- a/scripts/install +++ b/scripts/install @@ -1,11 +1,5 @@ #!/usr/bin/env bash -# Exit on command errors -# set -o errexit -# Treat unset variables as an error -# set -o nounset -set -eu - source /usr/share/yunohost/helpers source .hfunctions @@ -36,6 +30,8 @@ ynh_normalize_path() { } main() { + ynh_abort_if_errors + local app=$YNH_APP_INSTANCE_NAME local is_public=$YNH_APP_ARG_IS_PUBLIC local domain=$YNH_APP_ARG_DOMAIN diff --git a/scripts/restore b/scripts/restore index 5c8feee..ec47772 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,13 +1,13 @@ #!/usr/bin/env bash -set -eu - source /usr/share/yunohost/helpers # TODO: enable with fix of https://github.com/YunoHost/yunohost/pull/246 # source .hfunctions main() { + ynh_abort_if_errors + local app=$YNH_APP_INSTANCE_NAME local domain=$(ynh_app_setting_get $app domain) local path=$(ynh_app_setting_get $app path) diff --git a/scripts/upgrade b/scripts/upgrade index ffaca80..6895965 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,15 +1,11 @@ #!/usr/bin/env bash -# Exit on command errors -#set -o errexit -# Treat unset variables as an error -#set -o nounset -set -eu - source /usr/share/yunohost/helpers source .hfunctions main() { + ynh_abort_if_errors + local app=${YNH_APP_INSTANCE_NAME} local domain=$(ynh_app_setting_get ${app} domain) local path=$(ynh_app_setting_get ${app} path)