Skip to content

Instantly share code, notes, and snippets.

@wilhelmtell
Created April 4, 2010 06:15
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 wilhelmtell/355165 to your computer and use it in GitHub Desktop.
Save wilhelmtell/355165 to your computer and use it in GitHub Desktop.
# polymorphism in bash ?
prepare_c() {
cp ~/c_skeleton $1
cp ~/c_makefile_skeleton $1
}
prepare_bash() {
cp ~/bash_skeleton $1
}
prepare_ruby() {
cp ~/ruby_skeleton $1
cp ~/ruby_rake_skeleton $1
}
DIRECTORY=$1
LANGUAGE=$2
prepare_$LANGUAGE $DIRECTORY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment