summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@free.fr>2012-11-22 18:43:26 (GMT)
committerYann E. MORIN" <yann.morin.1998@free.fr>2012-11-22 18:43:26 (GMT)
commit6530528cf914ac26ba46314ba864c1a02f365d15 (patch)
tree19aed2441a9c9117831f8f745190e28ed4a295c5 /scripts/functions
parentb15822f702b508c5aeef4e2afaba957a7558c9f8 (diff)
scripts/functions: fix debug-shell1.17
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" <yann.morin.1998@free.fr> (transplanted from 2af20cfd210bac338ec18d774458c84fd585ef07)
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions22
1 files changed, 13 insertions, 9 deletions
diff --git a/scripts/functions b/scripts/functions
index c47aadb..a089a71 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -71,16 +71,15 @@ CT_OnError() {
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"
;;
+ 3) break;;
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 @@ CT_OnError() {
# 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 @@ CT_DoExecLog() {
"${@}" 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