mirror of
				https://github.com/avatao-content/test-tutorial-framework
				synced 2025-11-04 02:42:56 +00:00 
			
		
		
		
	Handle log stuff in a more robust manner bootstrap script
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user