From dc67f74e2df4b2e4d70bbe5032351f5baeb98471 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 26 Aug 2024 09:50:09 -0300 Subject: src/untill: Remove -h and --help --- src/untill | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/src/untill b/src/untill index 9290cfe..34532de 100755 --- a/src/untill +++ b/src/untill @@ -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 -- cgit v1.2.3