From 32a5b5e6107f8c578189329231e8b46df5b2a7c3 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 8 Jan 2015 11:44:48 -0700 Subject: [PATCH] print the version of node, if installed --- setup.bash | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup.bash b/setup.bash index bdd226e..3f9adfd 100644 --- a/setup.bash +++ b/setup.bash @@ -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