Skip to content

Instantly share code, notes, and snippets.

@likai24
Created June 23, 2016 04:35
Show Gist options
  • Save likai24/a2d0e6aa06c4194d1015427ca113d7e3 to your computer and use it in GitHub Desktop.
Save likai24/a2d0e6aa06c4194d1015427ca113d7e3 to your computer and use it in GitHub Desktop.
检查软件有没有安装
# check whether git is installed
command -v git >/dev/null 2>&1 || { echo >&2 "git is required but it's not installed. Aborting."; exit 1; }
# check node
check_node=$(which node);
if [[ -z $check_node ]];
then
# install_node
else
echo 'Node Already Installed';
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment