Created
August 15, 2018 18:41
-
-
Save zdennis/d9e1f0b2e74897d7090247d8fee13c6b to your computer and use it in GitHub Desktop.
Poor man's rubocop guard/watcher.
This file contains hidden or 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
compute_hash() { | |
git s | grep $1 | cut -d" " -f2 | xargs cat | md5 | |
} | |
HSH=`compute_hash rb` | |
for i in `seq 1 100000` ; do | |
NHSH=`compute_hash rb` | |
if [ "$HSH" != "$NHSH" ] ; then | |
git s | grep rb | xargs rubocop | |
else | |
echo -n '.' | |
fi | |
HSH=$NHSH | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment