diff options
author | Erich Eckner <git@eckner.net> | 2020-04-28 11:02:53 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-04-28 11:02:53 +0200 |
commit | 95a93098a28685194093977e7663cb2e9767596b (patch) | |
tree | 08c6985ea269f253161e378f1766a9464f2c6edc /update-me.in | |
parent | 8b6e4bfebdf6d5f363c19d29fc42dfc131a19995 (diff) | |
download | update-all-95a93098a28685194093977e7663cb2e9767596b.tar.xz |
update-me: allow to try again on error
Diffstat (limited to 'update-me.in')
-rw-r--r-- | update-me.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/update-me.in b/update-me.in index 2ec41e2..2daeb04 100644 --- a/update-me.in +++ b/update-me.in @@ -159,8 +159,16 @@ for cmd in "${cmds[@]}" do eval ${pre} ${cmd} err=$? - if [ ${err} -ne 0 ] - then + while [ ${err} -ne 0 ]; do + >&2 printf '%s (%s): Fehler - nochmal versuchen?\n' "$(hostname)" "${cmd}" + read s + if [ -n "${s}" ]; then + break + fi + eval ${pre} ${cmd} + err=$? + done + if [ ${err} -ne 0 ]; then exit_or_rescue_shell ${err} fi done |