From fe95e0fee3e22d94d0ed815be0f0c90b681e6019 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Wed, 19 Oct 2011 14:30:37 -0700 Subject: [PATCH] only chown if needed (fixes nfs issue) --- stack.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index a49de1a..62d5073 100755 --- a/stack.sh +++ b/stack.sh @@ -271,8 +271,11 @@ failed() { # 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 -sudo chown `whoami` $DEST +if [ ! -w $DEST ]; then + sudo chown `whoami` $DEST +fi # Install Packages # ================