A simple bash event loop for triggering anything after saves.
Just give it a path to watch followed by a hyphen, followed by a hyphen-delimited list of commands to run. It'll run them sequentially, and then set up to detect new changes in the path. Loops until you kill it.
Obligatory sketchy one-liner installation. Give me your sudos.
curl -s https://raw.githubusercontent.com/gepoch/watchrun/master/watchrun | sudo tee /usr/local/bin/watchrun >/dev/null && sudo chmod +x /usr/local/bin/watchrun
Make your source code with every tweak!
$ watchrun . - make
Build and rsync your grunt project with each save!
$ watchrun . - grunt build - rsync -ravP ./ [email protected]:./
Keep TPS reports from falling through the cracks! (Requires https://github.com/EvanHahn/pushbullet-cli)
$ watchrun ~/Documents - pb -a "Quit putting stuff in Documents! You're just gonna forget about it!!"
Have a REALLY granular git history with detailed commit messages! (PROBABLY DON'T ACTUALLY DO THIS! YOUR COWORKERS ARE HASSLED ENOUGH!)
$ watchrun . - git add --all - git commit -m "Some fixes." - git push --all