Created
April 17, 2014 15:00
-
-
Save adamrights/10990045 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
. /opt/elasticbeanstalk/env.vars | |
function error_exit | |
{ | |
eventHelper.py --msg "$1" --severity ERROR | |
exit $2 | |
} | |
#install not-installed yet app node_modules | |
if [ ! -d "/var/node_modules" ]; then | |
mkdir /var/node_modules ; | |
fi | |
if [ -d /tmp/deployment/application ]; then | |
ln -s /var/node_modules /tmp/deployment/application/ | |
fi | |
OUT=$([ -d "/tmp/deployment/application" ] && cd /tmp/deployment/application && /opt/elasticbeanstalk/node-install/node-v$NODE_VER-linux-$ARCH/bin/npm install 2>&1) || error_exit "Failed to run npm install. $OUT" $? | |
echo $OUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment