Skip to content

Commit

Permalink
Allow passing PREFIX to ./install.sh.
Browse files Browse the repository at this point in the history
  • Loading branch information
n1mmy committed Mar 6, 2012
1 parent c242531 commit 50efb00
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

cd `dirname $0`

PARENT="/usr/local"
TARGET_DIR="/usr/local/meteor"
if [ "$PREFIX" != "" ] ; then
PARENT="$PREFIX"
else
PARENT="/usr/local"
fi
TARGET_DIR="$PARENT/meteor"

# XXX try to fix it up automatically?
if [ ! -d "$PARENT" -o ! -w "$PARENT" ] ; then
Expand All @@ -14,6 +18,8 @@ elif [ -d "$PARENT/bin" -a ! -w "$PARENT/bin" ] ; then
exit 1
fi

echo "Installing in $PARENT"

rm -rf "$TARGET_DIR"

# make sure dev bundle exists before trying to install
Expand Down

0 comments on commit 50efb00

Please sign in to comment.