Last active
August 29, 2015 14:02
-
-
Save martint/fa04776d01eefaab0e45 to your computer and use it in GitHub Desktop.
notify wrapper
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
# needs https://github.com/alloy/terminal-notifier | |
# brew install terminal-notifier | |
# to use, source this file or copy the code into your bashrc, | |
# then prefix your commands with "notify". E.g., | |
# | |
# notify mvn clean install | |
# | |
notify() { | |
"$@" | |
local result=$? | |
local message=Succeeded | |
test $result -ne 0 && message=Failed | |
terminal-notifier -group "$1" -title "$*" -message "$message" | |
return $result | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment