From b8bbaab9d943eae380f7de51af3f35c384cdc5b3 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 22 Jul 2017 03:44:46 +0100 Subject: [PATCH] install script uses command -v for executable detection --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install b/install index c3c3162..6a32cd6 100755 --- a/install +++ b/install @@ -3,13 +3,13 @@ cat LICENCE git submodule init git submodule update -if [ ! -e /usr/bin/node ] && [ ! -e /usr/local/bin/node ] && [ ! -e /usr/local/bin/node ] && [ ! -e /usr/sbin/node ]; -then +command -v node > /dev/null +if [[ $? -gt 0 ]]; then echo 'node.js is not installed. Please install it before running install.sh.' exit 1 fi -if [ ! -e /usr/bin/npm ] && [ ! -e /usr/local/bin/npm ] && [ ! -e /usr/sbin/npm ]; -then +command -v npm > /dev/null +if [[ $? -gt 0 ]]; then echo 'npm is not installed. Please install it before running install.sh' exit 1 fi