Skip to content

Instantly share code, notes, and snippets.

@CodeMan99
Created March 18, 2015 05:04
Show Gist options
  • Save CodeMan99/d8b69a355b7d916b234c to your computer and use it in GitHub Desktop.
Save CodeMan99/d8b69a355b7d916b234c to your computer and use it in GitHub Desktop.
#!/bin/sh
git ls-files "*.mak" | sed 'p; s/mak$/mako/' | xargs -n2 git mv;
bad=$(git grep -l '\.mak\b')
echo $bad | xargs -n1 sed -i 's/\.mak\b/.mako/'
git add $bad
git commit -m "Change '.mak' extension to '.mako'."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment