Skip to content

Instantly share code, notes, and snippets.

@tbranyen
Created January 11, 2012 19:42
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbranyen/1596382 to your computer and use it in GitHub Desktop.
Save tbranyen/1596382 to your computer and use it in GitHub Desktop.
Automatically download and install the Backbone Boilerplate.
#!/bin/bash
#
# Copyright 2012, Tim Branyen @tbranyen <tim@tabdeveloper.com>
# Dual licensed under the MIT and GPL licenses.
#
# Automatically download and install the Backbone Boilerplate.
#
# Install: wget -O - https://gist.github.com/raw/1596382/bbb.sh > /usr/local/bin/bbb
# chmod +x /usr/local/bin/bbb
#
# Default install path
INSTALL_PATH=.
# Default Git repository path
REPO=http://github.com/tbranyen/backbone-boilerplate
function main {
# Passed a path argument
args=$*
if [ $# -gt 0 ]; then
INSTALL_PATH=$args
fi
# Clone the repository
git clone -q $REPO $INSTALL_PATH
# Change into the new folder
if [ $INSTALL_PATH != '.' ]; then
cd $INSTALL_PATH
fi
# Delete the .git folder
rm -rf .git
}
main $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment