Browse Source

Add helper scripts

master
ViViDboarder 4 years ago
parent
commit
c1a99e2cad
  1. 8
      README.md
  2. 4
      scripts/gopush.bash
  3. 7
      scripts/gopush.fish

8
README.md

@ -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

@ -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

@ -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
Loading…
Cancel
Save