Move DEST ahead of stack account creation
Change-Id: I25892e8a9249d3d421062d910d53b8de8134ef80
diff --git a/stack.sh b/stack.sh
index ade8710..f2f12ad 100755
--- a/stack.sh
+++ b/stack.sh
@@ -219,6 +219,12 @@
sudo rm -f /etc/sudoers.d/stack_sh_nova
fi
+# Create the destination directory and ensure it is writable by the user
+sudo mkdir -p $DEST
+if [ ! -w $DEST ]; then
+ sudo chown `whoami` $DEST
+fi
+
# Set True to configure ``stack.sh`` to run cleanly without Internet access.
# ``stack.sh`` must have been previously run with Internet access to install
# prerequisites and initialize ``$DEST``.
@@ -602,12 +608,6 @@
# an error. It is also useful for following along as the install occurs.
set -o xtrace
-# create the destination directory and ensure it is writable by the user
-sudo mkdir -p $DEST
-if [ ! -w $DEST ]; then
- sudo chown `whoami` $DEST
-fi
-
# Install Packages
# ================