Skip to content

Instantly share code, notes, and snippets.

@mfornasa
Created October 2, 2014 15:05
Show Gist options
  • Save mfornasa/2ce91d00f2cd86f76c23 to your computer and use it in GitHub Desktop.
Save mfornasa/2ce91d00f2cd86f76c23 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Accepts a --fast parameter (do not perform full dependecy download)
# Exit status = 0 if success, non-zero if error
# Exit at first failure
set -e
echo "`date -u `: Starting commit_dependencies"
FAST=0
if [[ $@ == **--fast** ]]; then
FAST=1
fi
if [ $FAST -eq "0" ]; then
echo "`date -u `: Cleaning node_modules"
rm -rf node_modules/
fi
echo "`date -u `: Installing dependencies"
npm install
echo "`date -u `: commit_dependencies done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment