print the version of node, if installed

This commit is contained in:
AJ ONeal 2015-01-08 11:44:48 -07:00
parent b1952e44f6
commit 32a5b5e610
1 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,16 @@
# wget -nv https://example.com/setup.bash -O - | bash
BASE_URL="https://raw.githubusercontent.com/coolaj86/node-install-script/master"
if [ -n "$(which node 2>/dev/null || false)" ]; then
echo ""
echo "HEY, LISTEN:"
echo "node is already install as $(node -v | grep v)"
echo ""
echo "to reinstall please first run: rm $(which node)"
echo ""
fi
if [ -f "/tmp/NODE_VER" ]; then
NODE_VER=$(cat /tmp/NODE_VER | grep v)
fi