-
-
Save textgoeshere/1262881 to your computer and use it in GitHub Desktop.
quick and dirty script to "growl" notify outcome of long-running command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# create an array from the params | |
declare -a CMD=($*) | |
# execute the command given by the params | |
${CMD[@]} | |
# notify the outcome given by the exit code | |
if [ $? == 0 ] | |
then | |
notify-send "${CMD[0]} passed" -i gtk-dialog-info | |
else | |
notify-send "${CMD[0]} failed" -i gtk-dialog-error | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment