From 6433047dabdc266fcbe8717eb87765b474491ff8 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 15 Jan 2015 14:34:11 -0700 Subject: [PATCH] Update setup-ubuntu.bash --- setup-ubuntu.bash | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/setup-ubuntu.bash b/setup-ubuntu.bash index 633e36b..70c25f7 100644 --- a/setup-ubuntu.bash +++ b/setup-ubuntu.bash @@ -24,12 +24,21 @@ then fi # iojs -if [ -n "$(which iojs | grep iojs 2>/dev/null)" ]; then +if [ -n "$(which node | grep node 2>/dev/null)" ]; then IOJS_VER="" - + + if [ "$(node -v 2>/dev/null)" != "$(iojs -v 2>/dev/null)" ]; then + echo "You have node.js installed. Backing up $(which node) as $(which node).joyent" + echo "(you can move it back after the install if you want separate node.js and io.js installations)" + echo "" + echo sudo mv "$(which node)" "$(which node).joyent" + sudo mv "$(which node)" "$(which node).joyent" + fi + if [ "${IOJS_VER}" == "$(iojs -v 2>/dev/null)" ]; then echo iojs ${IOJS_VER} already installed else + clear echo "" echo "HEY, LISTEN:" echo "io.js is already installed as iojs $(iojs -v | grep v)"