diff --git a/bin/checknode b/bin/checknode index 0288125..e4c9345 100644 --- a/bin/checknode +++ b/bin/checknode @@ -1,16 +1,9 @@ -if [ -s "${NODE_HOME}/node" ]; then -echo "NodeJs found. Good for you! Go tell Yoav you've managed to install it" +command_exists () { + type "$1" &> /dev/null ; +} +if command_exists node ; then + echo "Node.js was found. Happy Happy Joy Joy." else -echo "***********************************************************************************************" -echo "* *" -echo "* --- FATAL!!! --- *" -echo "* *" -echo "* NODE_HOME is not defined or does not point to NodeJs base directory *" -echo "* NodeJs must be installed in the build environment (http://nodejs.org/download/) *" -echo "* And NODE_JOME should be set to NodeJs's base folder *" -echo "* See Yoav Avrahami +972-54-2344146 for more details *" -echo "* *" -echo "***********************************************************************************************" -exit 1 + echo "Node.js is not installed or is not in your PATH. Please, fix it before continue." + exit 1 fi -