From 5656ae2687decc01adaeb4739463af74f18bbb40 Mon Sep 17 00:00:00 2001 From: Nick Martin Date: Fri, 17 Feb 2012 16:51:38 -0800 Subject: [PATCH] Safety belt install.sh. --- install.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index be83528022..e5e2b3b2f4 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,17 @@ cd `dirname $0` -TARGET_DIR=/usr/local/meteor +PARENT="/usr/local" +TARGET_DIR="/usr/local/meteor" + +# XXX try to fix it up automatically? +if [ ! -d "$PARENT" -o ! -w "$PARENT" ] ; then + echo "Can not write to $PARENT" + exit 1 +elif [ -d "$PARENT/bin" -a ! -w "$PARENT/bin" ] ; then + echo "Can not write to $PARENT/bin" + exit 1 +fi rm -rf "$TARGET_DIR"