I have been doing a large number of tasks lately that involve executing long-running processes from a Makefile — maybe somewhere in the neighborhood of 40 seconds to 5 minutes. They’re just long enough that I get bored and go off and do something else, but short and urgent enough that I would really want to do something (usually manually test) right after the process is done. I need to not drift off into procrastination world. I need to be alerted when my process completes.
I have taken to adding a ‘say’ command to my Makefiles. If you aren’t familiar, on OS X ‘say’ will have the computer speak out whatever you have written using the Text-to-Speech system setup in the OS. So that way, when I am looking in a browser window being distracted, a disembodied voice can startle me out of my reverie and I can jump right back in as soon as possible.
I usually do something like this:
clean : gcloud container clusters delete $(CLUSTER) -q gsutil -m rm -r gs://artifacts.$(PROJECT).appspot.com gcloud compute --project $(PROJECT) addresses delete "ip1" gcloud compute --project $(PROJECT) addresses delete "ip2" gcloud compute --project $(PROJECT) addresses delete "ip3" burnitdown: clean say “Project $(PROJECT) has been burnt to the ground.”
As always, your command names and mileage may vary. And turn down your volume. Or don’t.