From ce206fc0b7844eb2851a636d2acc73e69d6df958 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Mon, 5 Dec 2016 00:24:50 +0000 Subject: [PATCH] chore: fix the bintray-debian publishing script (#930) This change prevents the script erroring with `BINTRAY_USER: unbound variable` when `$BINTRAY_USER` isn't defined, and instead displays the "Please define the following ..." message as expected. --- scripts/publish/bintray-debian.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/publish/bintray-debian.sh b/scripts/publish/bintray-debian.sh index cc262348..0bc2f1be 100755 --- a/scripts/publish/bintray-debian.sh +++ b/scripts/publish/bintray-debian.sh @@ -34,13 +34,15 @@ if [ "$#" -ne 1 ]; then exit 1 fi -if [ -z $BINTRAY_USER ] || [ -z $BINTRAY_API_KEY ]; then +set +u +if [ -z "$BINTRAY_USER" ] || [ -z "$BINTRAY_API_KEY" ]; then echo "Please define the following environment variables:" 1>&2 echo "" 1>&2 echo " BINTRAY_USER" 1>&2 echo " BINTRAY_API_KEY" 1>&2 exit 1 fi +set -u ARGV_FILE=$1 PACKAGE_COMPONENT=etcher