Skip to content

Instantly share code, notes, and snippets.

@chr15m
Created December 5, 2016 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chr15m/7dc1a8c79e26ccdf319f3ca476750ea7 to your computer and use it in GitHub Desktop.
Save chr15m/7dc1a8c79e26ccdf319f3ca476750ea7 to your computer and use it in GitHub Desktop.
Shell script using make to watch a project and re-build on demand.
#!/bin/sh
while true;
do
if ! make -q "$@";
then
echo "#-> Starting build: `date`"
make "$@";
echo "#-> Build complete."
fi
sleep 0.5;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment