Created
January 11, 2012 19:42
-
-
Save tbranyen/1596382 to your computer and use it in GitHub Desktop.
Automatically download and install the Backbone Boilerplate.
This file contains hidden or 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/bash | |
# | |
# Copyright 2012, Tim Branyen @tbranyen <[email protected]> | |
# 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