diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/untill | 52 |
1 files changed, 0 insertions, 52 deletions
@@ -5,56 +5,9 @@ usage() { cat <<-'EOF' Usage: until [-m MAX] [-n SECONDS] COMMAND... - until -h EOF } -help() { - cat <<-'EOF' - - - Options: - -n SECONDS the amount of seconds to sleep between - attempts (default: 5) - -m MAX the maximum number of attempts (default: unlimited) - -h, --help show this message - - COMMAND the shell command to be executed - - - Runs COMMAND until it eventually succeeds, trying atmost MAX - times. Sleep SECONDS between attempts. - - - Examples: - - Try flaky build until it succeeds: - - $ until guix home build home.scm - - - Try atmost 10 timex to build until a new version is successfull, - waiting 30 seconds between attempts: - - $ until -m 10 -n 30 -- x git pull AND make - EOF -} - - -for flag in "$@"; do - case "$flag" in - (--) - break - ;; - (--help) - usage - help - exit - ;; - (*) - ;; - esac -done _SECONDS=5 while getopts 'm:n:h' flag; do @@ -65,11 +18,6 @@ while getopts 'm:n:h' flag; do (n) _SECONDS="$OPTARG" ;; - (h) - usage - help - exit - ;; (*) usage >&2 exit 2 |