Created
March 5, 2014 22:50
-
-
Save donaldallen/9378369 to your computer and use it in GitHub Desktop.
Sharing gulp projects with other devs can be pain, because you need to tell them to have node, brew, etc. installed. This script does that for them.
This file contains 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/sh | |
if ! brew_loc="$(type -p "brew")" || [ -z "brew_loc" ]; then | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
else | |
printf "\e[0;32mBrew\e[0m already installed.\n" | |
fi | |
printf "Updating \e[0;32mBrew\e[0m...\n\n" | |
brew update | |
printf "\n\e[0;32mBrew\e[0m updated.\n" | |
if ! node_loc="$(type -p "node")" || [ -z "node_loc" ]; then | |
brew install node | |
else | |
printf "\e[0;32mnode.js\e[0m already installed.\n" | |
fi | |
if ! bower_loc="$(type -p "bower")" || [ -z "bower_loc" ]; then | |
npm install -g bower | |
else | |
printf "\e[0;32mBower\e[0m already installed.\n" | |
fi | |
if ! gulp_loc="$(type -p "gulp")" || [ -z "gulp_loc" ]; then | |
npm install -g gulp | |
else | |
printf "\e[0;32mGulp\e[0m already installed.\n" | |
fi | |
bower install | |
sudo npm install | |
gulp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment