-
-
Save codeinthehole/c7cd193d2e31141e919cc29d2b3f81b5 to your computer and use it in GitHub Desktop.
Notifier script to use with long-running commands
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
#!/usr/bin/env bash | |
# | |
# Show an OSX alert | |
# | |
# This is useful when used in conjunction with a long-running script. Use this script to | |
# get a notification when te long-running script finishes. | |
# | |
# Eg: | |
# | |
# $ ./someprocess ; boo | |
# $ ./someprocess ; boo "npm install has finished! HOORAY!" | |
TITLE="😎 😎 😎 " | |
MESSAGE="${1:-"Good news master. Your script has finished running"}" | |
ICON="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ErasingIcon.icns" | |
terminal-notifier -title "$TITLE" -message "$MESSAGE" -sound Sosumi -appIcon "$ICON" | |
say -v Zarvox "$MESSAGE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment