From 95a93098a28685194093977e7663cb2e9767596b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 28 Apr 2020 11:02:53 +0200 Subject: update-me: allow to try again on error --- update-me.in | 12 ++++++++++-- 1 file 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 -- cgit v1.2.3-70-g09d2