diff --git a/hack/bootstrap_tfw_dev.sh b/hack/bootstrap_tfw_dev.sh index 078c09a..3a0d2ed 100755 --- a/hack/bootstrap_tfw_dev.sh +++ b/hack/bootstrap_tfw_dev.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -eo pipefail +shopt -s expand_aliases TFW_POSTFIX=tutorial-framework BASEIMAGE=baseimage-${TFW_POSTFIX} @@ -7,7 +8,7 @@ TEST=test-${TFW_POSTFIX} FRONTEND=frontend-${TFW_POSTFIX} LOGFILE=/tmp/bootstrap_tfw.log -[ "$(uname)" == "Darwin" ] && sed_cmd="gsed" || sed_cmd="sed" +[ "$(uname)" == "Darwin" ] && alias sed="gsed" || : showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; } cleanlog() { rm $LOGFILE; } @@ -32,7 +33,7 @@ if [ -z "$TFWDEV" ]; then TFWURL=https://registry.hub.docker.com/v1/repositories/avatao/tutorial-framework/tags PYTHON_PARSEJSON="import sys, json; print json.load(sys.stdin)[-1]['name']" LATESTTAG="$(curl -fsSL ${TFWURL} | python -c "${PYTHON_PARSEJSON}")" - $sed_cmd -i "1 s/.*/&:${LATESTTAG}/" "${TEST}/solvable/Dockerfile" + sed -i "1 s/.*/&:${LATESTTAG}/" "${TEST}/solvable/Dockerfile" echo "Done!" rm -rf "${TEST}/.git" diff --git a/hack/oneline_install.sh b/hack/oneline_install.sh index 9679133..337d207 100644 --- a/hack/oneline_install.sh +++ b/hack/oneline_install.sh @@ -1 +1 @@ -URL=https://git.io/vxBfj SHA=835ef74695dfcc1003376a19f5e67a9363ab875e4360651aafe7a2597134cc0b 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=28cddbadc12416fd160590340010189368711612f5ddb9d18ad933ae0199da53 bash -c 'cmd="$(curl -fsSL $URL)" && [ $(echo "$cmd" | sha256sum | cut -d " " -f1) == $SHA ] && echo "$cmd" | bash || echo Checksum mismatch!' diff --git a/hack/tfw.sh b/hack/tfw.sh index 604814e..d1dd728 100755 --- a/hack/tfw.sh +++ b/hack/tfw.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash set -eo pipefail +shopt -s expand_aliases -[ "$(uname)" == "Darwin" ] && readlink_cmd="greadlink" || readlink_cmd="readlink" -SCRIPT_DIR="$(dirname $($readlink_cmd -f $0))" +[ "$(uname)" == "Darwin" ] && alias readlink="greadlink" || : +SCRIPT_DIR="$(dirname $(readlink -f $0))" TAO_PATH="${TAO_PATH:-$SCRIPT_DIR/../..}" BASEIMAGE_REPO="${BASEIMAGE_REPO:-baseimage-tutorial-framework}"