From b06554d7815cdba00752cfea8771bf3ddf7757e9 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Wed, 24 May 2017 10:29:44 +0200 Subject: Initial commit --- pbnotify | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 pbnotify (limited to 'pbnotify') diff --git a/pbnotify b/pbnotify new file mode 100755 index 0000000..44b0661 --- /dev/null +++ b/pbnotify @@ -0,0 +1,12 @@ +#!/usr/bin/bash + +if [ $# -lt 2 ]; then + echo "Arguments missing! Usage: pbnotify \"message title\" \"message body\"" + exit 1 +fi + +curl -u $PB_API:\ + -X POST https://api.pushbullet.com/v2/pushes \ + --header 'Content-Type: application/json' \ + --data-binary "{\"type\": \"note\", \"title\": \"$1\", \"body\": \"$2\"}" \ + --silent > /dev/null -- cgit v1.2.3