Add helper scripts

This commit is contained in:
ViViDboarder 2017-05-30 15:30:59 -07:00
parent d87e00a4a1
commit c1a99e2cad
3 changed files with 18 additions and 1 deletions

View File

@ -12,4 +12,10 @@ gopush "Whatever you want pushed"
Defaults to all devices, but you can also specify with `gopush -d="Device name"`. Can't remember your devices? `gopush -l` will list them.
I often use this combined with a bash or fish script (maybe I'll post later) to push me successes, failures, or results for long running commands.
I often use this combined with the bash or fish scripts in `./scripts` to push me successes, failures, or results for long running commands.
Example:
```
make superlongbuild ; pb-notify
```
Once it's done I get a handy push notification telling me if it exited with 0 or 1.

4
scripts/gopush.bash Normal file
View File

@ -0,0 +1,4 @@
alias pb-done='gopush "Done"'
alias pb-success='gopush "Success"'
alias pb-failure='gopush "Failure"'
function pb-notify() { $* && pb-success || pb-failure; }

7
scripts/gopush.fish Normal file
View File

@ -0,0 +1,7 @@
# gopush
alias pb-done='gopush "Done"'
alias pb-success='gopush "Success"'
alias pb-failure='gopush "Failure"'
function pb-notify
[ $status = 0 ] ;and pb-success ;or pb-failure
end