-
-
Save e-minguez/9cb95ed0e1de81da485b59348f14d5ef to your computer and use it in GitHub Desktop.
This snippet is to be used as `my_time_consuming_command && pushbullet "title" "finished"`
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 | |
TOKEN="xxx" | |
TITLE=${1:-TITLE} | |
MESSAGE=${2:-MESSAGE} | |
curl --header "Access-Token: ${TOKEN}" \ | |
--header 'Content-Type: application/json' \ | |
--data-binary "{\"body\":\"${MESSAGE}\",\"title\":\"${TITLE}\",\"type\":\"note\"}" \ | |
--request POST --silent -o /dev/null \ | |
https://api.pushbullet.com/v2/pushes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment