Commit c41dad23 by Ned Batchelder Committed by George Song

Use trap EXIT to ensure printing the finish line

parent 2b578a23
...@@ -140,6 +140,11 @@ exec > >(tee $log_file) 2>&1 ...@@ -140,6 +140,11 @@ exec > >(tee $log_file) 2>&1
echo "Capturing output to $log_file" echo "Capturing output to $log_file"
echo "Installation started at $(date '+%Y-%m-%d %H:%M:%S')" echo "Installation started at $(date '+%Y-%m-%d %H:%M:%S')"
function finish {
echo "Installation finished at $(date '+%Y-%m-%d %H:%M:%S')"
}
trap finish EXIT
export OPENEDX_RELEASE=$release export OPENEDX_RELEASE=$release
echo "Installing release '$OPENEDX_RELEASE'" echo "Installing release '$OPENEDX_RELEASE'"
...@@ -192,6 +197,5 @@ else ...@@ -192,6 +197,5 @@ else
sudo bash -c "echo '192.168.33.10 preview.localhost' >> /etc/hosts" sudo bash -c "echo '192.168.33.10 preview.localhost' >> /etc/hosts"
fi fi
echo "Installation finished at $(date '+%Y-%m-%d %H:%M:%S')"
echo -e "${SUCCESS}Finished installing! You may now log in using 'vagrant ssh'" echo -e "${SUCCESS}Finished installing! You may now log in using 'vagrant ssh'"
echo -e "Refer to the edX wiki ($wiki_link) for more information on using $stack.${NC}" echo -e "Refer to the edX wiki ($wiki_link) for more information on using $stack.${NC}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment