I have a makefile that calls
...
@lessc less/mything.less > style.uncompressed.css
can i run a command like “beep” or “paplay …” when the lessc compiler has errors? If how do i do it?
I am running this in background and have a script checking folder for changes, if something changes this makefile is executed. I don’t have a 2nd monitor and i don’t want the console to be always on top. So a sound when a error would be great. Maybe someone knows another solution for this.
Make’s default action on build failure is to exit with a non-zero exit code. If make terminates with a non-zero exit code, you can make a simple wrapper around it that invokes the sound generation command: