diff options
author | EuAndreh <eu@euandre.org> | 2024-08-26 09:50:09 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-08-26 09:50:09 -0300 |
commit | dc67f74e2df4b2e4d70bbe5032351f5baeb98471 (patch) | |
tree | 1dc46c3befc2fe2b0f120e7202ab5d83293f27ee /src | |
parent | src/untill: Copy in untill(1) as is (diff) | |
download | eut-dc67f74e2df4b2e4d70bbe5032351f5baeb98471.tar.gz eut-dc67f74e2df4b2e4d70bbe5032351f5baeb98471.tar.xz |
src/untill: Remove -h and --help
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 |