1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-12 19:37:16 +00:00

Implement nicer handling of macOS compatibility aliases in hack folder

This commit is contained in:
Kristóf Tóth 2018-04-03 18:03:12 +02:00
parent 8a98fc05d5
commit 4234919902
3 changed files with 7 additions and 5 deletions

View File

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

View File

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

View File

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