判断是否安装了node
复制if ! type node >/dev/null 2>&1; then
echo 'node 未安装';
else
echo 'node 已安装';
fi
判断是否安装了npm
if ! type npm >/dev/null 2>&1; then
Echo_Red 'npm 未安装';
exit 1;
fi
标签:node,npm,shell,dev,fi,某个,软件,安装
From: https://www.cnblogs.com/exmyth/p/16994750.html