From 835ebe737f13313586853aba83a07d6e2e4720dd Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 20 Jan 2015 23:16:58 -0700 Subject: [PATCH] move paths to bash vars --- setup-iojs-mavericks.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup-iojs-mavericks.bash b/setup-iojs-mavericks.bash index 0770fd9..945d9ff 100644 --- a/setup-iojs-mavericks.bash +++ b/setup-iojs-mavericks.bash @@ -1,10 +1,11 @@ IOJS_VER=${1} +IOJS_REMOTE="http://iojs.org/dist/${IOJS_VER}/iojs-${IOJS_VER}.pkg" +IOJS_PKG="/tmp/iojs-${IOJS_VER}.pkg" if [ -n "${IOJS_VER}" ]; then echo "installing io.js as iojs ${IOJS_VER}..." - curl -fsSL "http://iojs.org/dist/${IOJS_VER}/iojs-${IOJS_VER}.pkg" -o "/tmp/iojs-${IOJS_VER}.pkg" - sudo /usr/sbin/installer -pkg "/tmp/iojs-${IOJS_VER}.pkg" -target / - + curl -fsSL "${IOJS_REMOTE}" -o "${IOJS_PKG}" + sudo /usr/sbin/installer -pkg "${IOJS_PKG}" -target / sudo chown -R $(whoami) /usr/local 2>/dev/null fi