Skip to content

Instantly share code, notes, and snippets.

@benjamincharity
Last active October 9, 2015 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjamincharity/3514515 to your computer and use it in GitHub Desktop.
Save benjamincharity/3514515 to your computer and use it in GitHub Desktop.
A simple shell script for Alfred that creates a new project and updates all dependancies with 'create exampleName'.
# Cd into my projects directory
cd ~/dropbox/freelance/projects/
# Create a new folder using the query
mkdir {query}
# Clone the boilerplate into this new directory
git clone https://github.com/benjamincharity/mm-boilerplate.git {query}
# Cd into the project
cd {query}
# Create rvmrc using the project name
rvm --rvmrc --create 1.9.3-p125@{query}
# Reload directory
cd .
# Run bundle
bundle
# Update jQuery
curl http://code.jquery.com/jquery.js > source/js/jquery.js
# Update Modernizr
curl http://modernizr.com/downloads/modernizr.js > source/js/modernizr.js
# Update Sugar [note: this link is not dynamic]
curl https://raw.github.com/andrewplummer/Sugar/master/release/1.3/sugar-1.3-full.development.js > source/js/sugar.js
# Update reset.scss
curl https://raw.github.com/benjamincharity/Resets/master/reset.scss > source/css/_reset.scss
# Initialize git
git init
# Remove the boilerplate repo
git remote rm origin
# Add the git repo origin
git remote add origin https://github.com/benjamincharity/{query}.git
# Fix github auth issues
git config remote.origin.url git@github.com:benjamincharity/{query}.git
# Add all the new files to git
git add .
# Make the initial commit
git commit -am "initial commit"
# Open project with macvim
mvim .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment