Skip to content

Instantly share code, notes, and snippets.

@rthbound
Created January 25, 2015 04:29
Show Gist options
  • Save rthbound/8e452ecf8e2af06a35b3 to your computer and use it in GitHub Desktop.
Save rthbound/8e452ecf8e2af06a35b3 to your computer and use it in GitHub Desktop.
Generating a bunch of hiiiighly similar projects
[email protected]:rthbound/WhatMoonIsIt.git
sourcename=WhatMoonIsIt
while IFS="," read -r downcased titleized; do
rm -rf What${titleized}IsIt
newsource=$(echo $source | sed "s/$sourcename/$titleized/g")
git clone $source What${titleized}IsIt
find ./What${titleized}IsIt -type f -exec sed -i "s/Moon/$titleized/g" {} \;
find ./What${titleized}IsIt -type f -exec sed -i "s/our moon/moon/g" {} \;
find ./What${titleized}IsIt -type f -exec sed -i "s/moon/$downcased/g" {} \;
sed -i "s/Moon/$titleized/g" ./What${titleized}IsIt/.git/config
cd What${titleized}IsIt
git commit -am "What ${titleized} Is It?"
git push -u origin gh-pages
cd ..
done < generation.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment