benjamincharity
8/29/2012 - 3:38 PM

A simple shell script for Alfred that creates a new project and updates all dependancies with 'create exampleName'.

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 .