move 'how to use cloud' info outside of xtrace

make the successful run output end with more clear messages.
By moving them outside of the "do it all" path, the xtrace output
will not mix with echo statements.
This commit is contained in:
Scott Moser 2011-10-07 14:51:07 +00:00 committed by Scott Moser
parent d67a18bb07
commit b94f4bf35b

View file

@ -654,6 +654,16 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then
fi
# Fin
# ===
) 2>&1 | tee "${LOGFILE}"
# Check that the left side of the above pipe succeeded
for ret in "${PIPESTATUS[@]}"; do [ $ret -eq 0 ] || exit $ret; done
(
# Using the cloud
# ===============
@ -671,19 +681,7 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
echo "the password: $ADMIN_PASSWORD"
fi
# Fin
# ===
) 2>&1 | tee "${LOGFILE}"
# because of the way pipes work, the left side of the pipe may
# have failed, but 'tee' will succeed. We need to check that.
for ret in "${PIPESTATUS[@]}"; do
[ $ret -eq 0 ] || exit $ret
done
# indicate how long this took to run (bash maintained variable 'SECONDS')
echo "stack.sh completed in $SECONDS seconds." | tee -a "${LOGFILE}"
echo "stack.sh completed in $SECONDS seconds."
exit 0
) | tee -a "$LOGFILE"