From 7aa4f20353ab38b9cbceb82fc83a214178d6dbaa Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Mon, 20 Sep 2010 22:59:02 -0700 Subject: [PATCH] Add untilfails and untilsuccessful --- bin/untilfails | 9 +++++++++ bin/untilsuccessful | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100755 bin/untilfails create mode 100755 bin/untilsuccessful diff --git a/bin/untilfails b/bin/untilfails new file mode 100755 index 0000000..51f85b0 --- /dev/null +++ b/bin/untilfails @@ -0,0 +1,9 @@ +#!/bin/sh + +"$@" +while [ $? -eq 0 ] +do + echo Retrying... + sleep 1 + "$@" +done diff --git a/bin/untilsuccessful b/bin/untilsuccessful new file mode 100755 index 0000000..1580e63 --- /dev/null +++ b/bin/untilsuccessful @@ -0,0 +1,9 @@ +#!/bin/sh + +"$@" +while [ $? -ne 0 ] +do + echo Retrying... + sleep 1 + "$@" +done