1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-12-05 02:11:32 +00:00

Improve TFWDEV detection logic to allow use of set -u

This commit is contained in:
Kristóf Tóth 2018-04-16 20:45:04 +02:00
parent e57ea7b436
commit fde8792277
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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!'