diff --git a/hack/bootstrap_tfw_dev.sh b/hack/bootstrap_tfw_dev.sh index ab10065..3e49e2d 100755 --- a/hack/bootstrap_tfw_dev.sh +++ b/hack/bootstrap_tfw_dev.sh @@ -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