node-installer.sh/setup-iojs-mavericks.bash

12 lines
355 B
Bash
Raw Normal View History

2015-01-15 22:41:04 +00:00
IOJS_VER=${1}
2015-01-21 06:16:58 +00:00
IOJS_REMOTE="http://iojs.org/dist/${IOJS_VER}/iojs-${IOJS_VER}.pkg"
IOJS_PKG="/tmp/iojs-${IOJS_VER}.pkg"
2015-01-15 22:41:04 +00:00
if [ -n "${IOJS_VER}" ]; then
echo "installing io.js as iojs ${IOJS_VER}..."
2015-01-21 06:16:58 +00:00
curl -fsSL "${IOJS_REMOTE}" -o "${IOJS_PKG}"
sudo /usr/sbin/installer -pkg "${IOJS_PKG}" -target /
2015-01-15 22:41:04 +00:00
sudo chown -R $(whoami) /usr/local 2>/dev/null
fi