Skip to content

Instantly share code, notes, and snippets.

@IharKrasnik
Created March 13, 2015 12:13
Show Gist options
  • Select an option

  • Save IharKrasnik/3820e8bfe1b8a9e1dfd9 to your computer and use it in GitHub Desktop.

Select an option

Save IharKrasnik/3820e8bfe1b8a9e1dfd9 to your computer and use it in GitHub Desktop.
asd
#!/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