Skip to content

Instantly share code, notes, and snippets.

@blaz-kranjc
Last active March 29, 2017 10:32
Show Gist options
  • Save blaz-kranjc/23483291f257cc2a6507a9fb7034859e to your computer and use it in GitHub Desktop.
Save blaz-kranjc/23483291f257cc2a6507a9fb7034859e to your computer and use it in GitHub Desktop.
make wrapper that plays music during compilation
#!/bin/bash
mplayer -loop 0 -slave /var/local/elevator.ogg &>/dev/null &
ELEVATOR_PID=$!
/usr/bin/make "$@"
function finally() {
kill $ELEVATOR_PID &>/dev/null
}
trap finally EXIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment