ftp -o - https://jcs.org/move_in | sh -
at master 23 lines 637 B view raw
1#!/bin/sh 2# cmd && pushover "done running cmd" 3# requires $PUSHOVER_USER_KEY and $PUSHOVER_API_TOKEN set in ~/.zshrc.local 4 5if [ X"${PUSHOVER_USER_KEY}" = X"" ]; then 6 echo "\$PUSHOVER_USER_KEY not set" 7 exit 1 8fi 9 10if [ X"${PUSHOVER_API_TOKEN}" = X"" ]; then 11 echo "\$PUSHOVER_API_TOKEN not set" 12 exit 1 13fi 14 15curl -s \ 16 --form-string "user=${PUSHOVER_USER_KEY}" \ 17 --form-string "token=${PUSHOVER_API_TOKEN}" \ 18 --form-string "message=${1}" \ 19 --form-string "device=iphone" \ 20 https://api.pushover.net/1/messages.json | grep -v 'status":1' 21 22# reverse exit code so that no output exits 0, any output exits 1 23[ $? == 1 ] && exit 0