# HG changeset patch # User "Yann E. MORIN" # Date 1353609806 -3600 # Node ID 8db5409109745475aa513aca94034b1034a17565 # Parent b8e00eab8f8144e54a3fadf5244838df359808c3 scripts/functions: fix debug-shell Properly catch resuming the build when continuing past the failed command. The 'case ;;&' construct is a bash4ism. Get rid of it. Signed-off-by: "Yann E. MORIN" (transplanted from 2af20cfd210bac338ec18d774458c84fd585ef07) diff -r b8e00eab8f81 -r 8db540910974 scripts/functions --- a/scripts/functions Tue Nov 20 16:59:17 2012 -0800 +++ b/scripts/functions Thu Nov 22 19:43:26 2012 +0100 @@ -71,16 +71,15 @@ printf "\nRe-trying last command.\n\n" break fi - ;;& + ;; 3) break;; - *) printf "\nPlease exit with one of these values:\n" - printf " 1 fixed, continue with next build command\n" - if [ -n "${cur_cmd}" ]; then - printf " 2 repeat this build command\n" - fi - printf " 3 abort build\n" - ;; esac + printf "\nPlease exit with one of these values:\n" + printf " 1 fixed, continue with next build command\n" + if [ -n "${cur_cmd}" ]; then + printf " 2 repeat this build command\n" + fi + printf " 3 abort build\n" done exit $result ) @@ -88,7 +87,7 @@ # Restore the trap handler eval "${old_trap}" case "${result}" in - 1) rm -f "${CT_WORK_DIR}/backtrace"; return;; + 1) rm -f "${CT_WORK_DIR}/backtrace"; touch "${CT_BUILD_DIR}/skip"; return;; 2) rm -f "${CT_WORK_DIR}/backtrace"; touch "${CT_BUILD_DIR}/repeat"; return;; # 3 is an abort, continue... esac @@ -258,7 +257,12 @@ "${@}" 2>&1 |CT_DoLog "${level}" ret="${?}" if [ -f "${CT_BUILD_DIR}/repeat" ]; then + rm -f "${CT_BUILD_DIR}/repeat" continue + elif [ -f "${CT_BUILD_DIR}/skip" ]; then + rm -f "${CT_BUILD_DIR}/skip" + ret=0 + break else break fi