mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 16:17:17 +00:00
Handle log stuff in a more robust manner bootstrap script
This commit is contained in:
parent
ee42b63be6
commit
2e4ecc42d2
@ -6,7 +6,11 @@ BASEIMAGE=baseimage-${TFW_POSTFIX}
|
|||||||
BACKEND=test-${TFW_POSTFIX}
|
BACKEND=test-${TFW_POSTFIX}
|
||||||
FRONTEND=frontend-${TFW_POSTFIX}
|
FRONTEND=frontend-${TFW_POSTFIX}
|
||||||
LOGFILE=/tmp/bootstrap_tfw.log
|
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
|
: > $LOGFILE
|
||||||
echo -n "Cloning TFW repositories... "
|
echo -n "Cloning TFW repositories... "
|
||||||
@ -27,4 +31,3 @@ wait
|
|||||||
echo "Done!"
|
echo "Done!"
|
||||||
echo
|
echo
|
||||||
echo "You can start TFW by executing the ${BACKEND}/hack/tfw_magic_start.sh script."
|
echo "You can start TFW by executing the ${BACKEND}/hack/tfw_magic_start.sh script."
|
||||||
rm $LOGFILE
|
|
||||||
|
Loading…
Reference in New Issue
Block a user