From 30ed4e710e396ec953f8ff7b83759428332e525c Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Sat, 4 Feb 2017 19:14:21 +0100 Subject: [PATCH] scripts: exit on unbound variables Fixes a package_linter warning. --- scripts/backup | 2 +- scripts/install | 2 +- scripts/remove | 2 +- scripts/upgrade | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/backup b/scripts/backup index ddba49d..ad5f6c7 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,5 +1,5 @@ #!/bin/bash -set -e # Exit on error +set -eu # exit on error ; treat unset variables as error app=mattermost diff --git a/scripts/install b/scripts/install index 1e6bd0d..a9e2940 100644 --- a/scripts/install +++ b/scripts/install @@ -1,5 +1,5 @@ #!/bin/bash -set -e # Exit on error +set -eu # exit on error ; treat unset variables as error # Retrieve arguments domain=$1 diff --git a/scripts/remove b/scripts/remove index 2d4492d..f6d58f1 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,5 +1,5 @@ #!/bin/bash -set -e # Exit on error +set -u # treat unset variables as an error domain=$(sudo yunohost app setting mattermost domain) db_name="mattermost" diff --git a/scripts/upgrade b/scripts/upgrade index e941af8..bfe0b29 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,5 +1,6 @@ #!/bin/bash -set -e # Exit on error +set -eu # exit on error ; treat unset variables as error + # Retrieve arguments domain=$(sudo yunohost app setting mattermost domain)