1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-14 03:57:16 +00:00

Handle log stuff in a more robust manner bootstrap script

This commit is contained in:
Kristóf Tóth 2018-03-24 12:18:59 +01:00
parent ee42b63be6
commit 2e4ecc42d2

View File

@ -6,7 +6,11 @@ BASEIMAGE=baseimage-${TFW_POSTFIX}
BACKEND=test-${TFW_POSTFIX}
FRONTEND=frontend-${TFW_POSTFIX}
LOGFILE=/tmp/bootstrap_tfw.log
trap 'echo && echo "Error! Showing logs at $LOGFILE:" && cat $LOGFILE' ERR
showlog() { echo && echo "Error! Showing logs:" && cat $LOGFILE; }
cleanlog() { rm $LOGFILE; }
trap showlog ERR
trap cleanlog EXIT
: > $LOGFILE
echo -n "Cloning TFW repositories... "
@ -27,4 +31,3 @@ wait
echo "Done!"
echo
echo "You can start TFW by executing the ${BACKEND}/hack/tfw_magic_start.sh script."
rm $LOGFILE