Skip to content

Instantly share code, notes, and snippets.

@craigw
Created October 26, 2009 11:16
Show Gist options
  • Save craigw/218591 to your computer and use it in GitHub Desktop.
Save craigw/218591 to your computer and use it in GitHub Desktop.
#! /bin/bash
# This is ~/bin/mc
# chmod +x ~/bin/mc
# Usage: mc foo
# Create a Mochiweb project called "foo" in the current
# directory.
# I keep my clone of http://github.com/toddlipcon/mochiweb at
# ~/code/third_party/mochiweb.
~/code/third_party/mochiweb/scripts/new_mochiweb.erl $@
# There's a bug just now that means for soe reason ebin doesn't
# get created. `make` doesn't like that.
[ -d "$1/ebin" ] || mkdir $1/ebin
# Version control, yum!
git init
# Ignore generated files.
echo 'doc/*' >> .gitignore
echo 'ebin/*' >> .gitignore
git add .
git commit -m "Initial import"
# Compile the project
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment