Skip to content

Instantly share code, notes, and snippets.

@darron
Created March 16, 2014 23:58
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 darron/9591665 to your computer and use it in GitHub Desktop.
Save darron/9591665 to your computer and use it in GitHub Desktop.
How I create new cookbooks: `newcook $name`
newcook() {
if [ $1 ] ; then
git clone https://github.com/darron/skeleton-cookbook.git $1-cookbook
cd $1-cookbook; rm -rf .git/
egrep -r "skeleton" * .kitchen.yml | cut -d ':' -f 1 | sort | uniq | xargs -n 1 sed -i '' "s/skeleton/$1/g"
git clone https://github.com/customink-webops/foodcritic-rules foodcritic/customink && rm -rf foodcritic/customink/.git
git clone https://github.com/etsy/foodcritic-rules foodcritic/etsy && rm -rf foodcritic/etsy/.git
git init . && git add . && git commit -a -m 'First commit.'
else
echo "Need the name of the cookbook."
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment