set errexit and xtrace in helper scripts
stack.sh invokes some helper scripts as separate processes, rather than
by source'ing them. As with stack.sh itself, abort immediately on the
first error, so that errors don't compound and result in confusing error
messages. If one of these helper scripts aborts, stack.sh itself will
also abort in the usual manner.
Due to the change in behaviour, tweak some mv invocations to ensure that
they don't trigger false failures.
As with stack.sh itself, also enable xtrace so we can see exactly what's
happening. In particular this allows us to see the cause of any
premature termination due to a command failing whilst errexit is
enabled.
Change-Id: I7a55784c31e5395e29ab9bbe2bb112b83b9be693
diff --git a/tools/install_pip.sh b/tools/install_pip.sh
index fc1c195..04e1826 100755
--- a/tools/install_pip.sh
+++ b/tools/install_pip.sh
@@ -9,6 +9,9 @@
# Assumptions:
# - update pip to $INSTALL_PIP_VERSION
+set -o errexit
+set -o xtrace
+
# Keep track of the current directory
TOOLS_DIR=$(cd $(dirname "$0") && pwd)
TOP_DIR=`cd $TOOLS_DIR/..; pwd`