From c1a99e2cadc011c174e677356af860f66c8aa626 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Tue, 30 May 2017 15:30:59 -0700 Subject: [PATCH] Add helper scripts --- README.md | 8 +++++++- scripts/gopush.bash | 4 ++++ scripts/gopush.fish | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 scripts/gopush.bash create mode 100644 scripts/gopush.fish diff --git a/README.md b/README.md index 2894a3d..631a9c7 100644 --- a/README.md +++ b/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. diff --git a/scripts/gopush.bash b/scripts/gopush.bash new file mode 100644 index 0000000..20be219 --- /dev/null +++ b/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; } diff --git a/scripts/gopush.fish b/scripts/gopush.fish new file mode 100644 index 0000000..24222d0 --- /dev/null +++ b/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