
AndBeep
1 minute read
Notify when a script finishes
As part of my job, I build an android app that needs about 2-3 minutes to compile and assemble. There unfortunately is no easy way to make this faster, so I have to go along. This causes that when the app is building I switch to another task (or youtube video) and 10 minutes later I forget what I was doing and the work really gets done very slowly.
For this reason I implemented a simple script, that I had put in /usr/local/bin/andbeep
and made executable. This is the contents:
#!/bin/bash
$@;
result=$?
espeak "Finished with $result"
exit $result
This now simply informs me when a command finished and also tells me its return value. For a build script now just prepend it with a andbeep and run it, so if you use make all
to run
your build, just use andbeep make all
to get notified when the build finishes.