Skip to content

Instantly share code, notes, and snippets.

@letsgetrandy
Created August 12, 2013 02:45
Show Gist options
  • Select an option

  • Save letsgetrandy/6207940 to your computer and use it in GitHub Desktop.

Select an option

Save letsgetrandy/6207940 to your computer and use it in GitHub Desktop.
Install several handy tools for UI development and testing.
#!/bin/bash
#
# uisetup
#
# This script will install the basic tools and utilities used
# on the UI team, and then it will kick off another script to
# install the shared development stack used by all developers
# create ~/bin if not already exists
if [ ! -d ~/bin ]; then
mkdir ~/bin
echo "" >> ~/.bash_profile
echo 'export PATH=~/bin:"$PATH"' >> ~/.bash_profile
export PATH=~/bin:"$PATH"
fi
# install Homebrew if not already there
if ! command -v brew >/dev/null 2>&1; then
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
fi
# install wget if not already there
if ! command -v wget >/dev/null 2>&1; then
brew install wget
fi
# install Node if not already there
if ! command -v node >/dev/null 2>&1; then
brew install node
fi
# install JSHint if not already there
if ! command -v jshint >/dev/null 2>&1; then
npm install -g jshint
fi
# instlal CSSLint if not already there
if ! command -v csslint >/dev/null 2>&1; then
npm install -g csslint
fi
# install PhantomJS if not already there
if ! command -v phantomjs >/dev/null 2>&1; then
brew install phantomjs
fi
# install CasperJS if not already there
if ! command -v casperjs >/dev/null 2>&1; then
brew install casperjs
fi
# install The Silver Searcher if not already there
if ! command -v ag >/dev/null 2>&1; then
brew install the_silver_searcher
fi
pushd ~/bin
# install css grep util
if [ ! -f cssgrep ]; then
curl -O https://gist.github.com/letsgetrandy/5560480/raw/735b22c5b2ef22342426a1c0aa3f263069a0116d/cssgrep
chmod 755 cssgrep
fi
# install orphan util
if [ ! -f orphan ]; then
curl -O https://gist.github.com/letsgetrandy/5614715/raw/90680cba6566e75a7b9d8a0504d085ba8fbe9ce5/orphan
chmod 755 orphan
fi
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment