Created
July 12, 2013 14:28
-
-
Save iamnoah/5984885 to your computer and use it in GitHub Desktop.
Crude bash script to run my jsshaper quotes and alpha plugins on any file in the current git project that has been modified. i.e., a sort of pre-commit cleanup.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET_DIR="`pwd`/" | |
cd `dirname $0` | |
for f in $(cd "$TARGET_DIR" && git status | grep "\.js$" | cut -c14- | awk -v root="$TARGET_DIR" '{ print root $1 }') | |
do | |
node run-shaper.js "$f" plugins/quotes.js plugins/alpha.js --source > "$f".fixed | |
mv "$f"{.fixed,} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment