Merge pull request #664 from somehibs/master

install script uses command -v for executable detection
This commit is contained in:
krn 2017-07-31 18:17:01 +01:00 committed by GitHub
commit 0f1c6c6782

View File

@ -3,13 +3,13 @@ cat LICENCE
git submodule init git submodule init
git submodule update git submodule update
if [ ! -e /usr/bin/node ] && [ ! -e /usr/local/bin/node ] && [ ! -e /usr/local/bin/node ] && [ ! -e /usr/sbin/node ]; command -v node > /dev/null
then if [[ $? -gt 0 ]]; then
echo 'node.js is not installed. Please install it before running install.sh.' echo 'node.js is not installed. Please install it before running install.sh.'
exit 1 exit 1
fi fi
if [ ! -e /usr/bin/npm ] && [ ! -e /usr/local/bin/npm ] && [ ! -e /usr/sbin/npm ]; command -v npm > /dev/null
then if [[ $? -gt 0 ]]; then
echo 'npm is not installed. Please install it before running install.sh' echo 'npm is not installed. Please install it before running install.sh'
exit 1 exit 1
fi fi