Last active
December 3, 2015 03:37
-
-
Save anxiousmodernman/1b903f12fa74030b3343 to your computer and use it in GitHub Desktop.
Is this a good idea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm_install() | |
{ | |
cd $PROJECT_HOME # package.json in here | |
if npm install | |
then | |
return 0 | |
else | |
return 1 | |
fi | |
} | |
do_build() | |
{ | |
if ! type npm > /dev/null | |
then | |
echo "npm command not found. Please install npm and/or configure your shell." | |
exit 1 | |
fi | |
if npm_install # call my function | |
then | |
# foo | |
echo "npm install was cool" | |
else | |
# fail | |
echo "npm install is mega fail" | |
fi | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment