forked from coolaj86/node-installer.sh
store node path & ver before moving
This commit is contained in:
parent
52d1bd8cdc
commit
331f4eadb9
|
@ -237,8 +237,10 @@ elif [ "$(node -v 2>/dev/null)" != "$(iojs -v 2>/dev/null)" ]; then
|
||||||
echo "(copy it back after the install to maintain node.js and io.js separately)"
|
echo "(copy it back after the install to maintain node.js and io.js separately)"
|
||||||
echo ""
|
echo ""
|
||||||
sleep 3
|
sleep 3
|
||||||
echo sudo mv "$(which node)" "$(which node).$(node -v)"
|
NODE_PATH=$(which node)
|
||||||
sudo mv "$(which node)" "$(which node).$(node -v)"
|
NODE_VER=$(node -v)
|
||||||
|
echo sudo mv "$NODE_PATH" "$NODE_PATH.$NODE_VER"
|
||||||
|
sudo mv "$NODE_PATH" "$NODE_PATH.$NODE_VER"
|
||||||
echo "################################################################################"
|
echo "################################################################################"
|
||||||
echo "to restore backup: sudo rsync -a '$(which node).$(node -v)' '$(which node)'"
|
echo "to restore backup: sudo rsync -a '$(which node).$(node -v)' '$(which node)'"
|
||||||
echo "################################################################################"
|
echo "################################################################################"
|
||||||
|
|
Loading…
Reference in New Issue