From fde87922771eb8851e69ece2aaffb7cb8c086733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Mon, 16 Apr 2018 20:45:04 +0200 Subject: [PATCH] Improve TFWDEV detection logic to allow use of set -u --- hack/bootstrap_tfw_dev.sh | 5 +++-- hack/oneline_install.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hack/bootstrap_tfw_dev.sh b/hack/bootstrap_tfw_dev.sh index fd39447..57f6743 100755 --- a/hack/bootstrap_tfw_dev.sh +++ b/hack/bootstrap_tfw_dev.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash -set -e +set -eu set -o pipefail set -o errtrace shopt -s expand_aliases [ "$(uname)" == "Darwin" ] && alias sed="gsed" || : +TFWDEV="${TFWDEV:-0}" TFW_POSTFIX=tutorial-framework BASEIMAGE=baseimage-${TFW_POSTFIX} TEST=test-${TFW_POSTFIX} @@ -19,7 +20,7 @@ run() clone_repos install_frontend_deps - if [ -z "$TFWDEV" ]; then + if [ "$TFWDEV" == "0" ]; then LATESTTAG="$(fetch_latest_tag)" LATESTTAG=$LATESTTAG pin_latest_baseimage LATESTTAG=$LATESTTAG build_latest_baseimage diff --git a/hack/oneline_install.sh b/hack/oneline_install.sh index c9690d3..357d461 100644 --- a/hack/oneline_install.sh +++ b/hack/oneline_install.sh @@ -1 +1 @@ -URL=https://git.io/vxBfj SHA=e72bc2836448c4ab0171d637b459546f927ae7ec63cafa2bf4596f50eaaa0aec bash -c 'cmd="$(curl -fsSL $URL)" && [ $(echo "$cmd" | sha256sum | cut -d " " -f1) == $SHA ] && echo "$cmd" | bash || echo Checksum mismatch!' +URL=https://git.io/vxBfj SHA=40cf2fec4e9d378dd8a4f049fd6ba7b7c415bf699e0a6e329ec8e3cf3f5d383c bash -c 'cmd="$(curl -fsSL $URL)" && [ $(echo "$cmd" | sha256sum | cut -d " " -f1) == $SHA ] && echo "$cmd" | bash || echo Checksum mismatch!'