diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/crosstool.sh | 4 | ||||
-rw-r--r-- | scripts/functions | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh index 90532991..8c78e575 100755 --- a/scripts/crosstool.sh +++ b/scripts/crosstool.sh @@ -410,6 +410,10 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then fi if [ ${do_it} -eq 1 ]; then do_${step} + if [ "${CT_STOP}" = "${step}" ]; then + CT_DoLog ERROR "Stopping just after step \"${step}\", as requested." + exit 0 + fi if [ "${CTDEBUG_CT_PAUSE_STEPS}" = "y" ]; then CT_DoPause "Step \"${step}\" finished" fi diff --git a/scripts/functions b/scripts/functions index 71eac4f1..dcf41603 100644 --- a/scripts/functions +++ b/scripts/functions @@ -519,12 +519,14 @@ CT_DoSaveState() { CT_DoLoadState(){ local state_name="$1" local state_dir="${CT_STATE_DIR}/${state_name}" + local old_RESTART="${CT_RESTART}" + local old_STOP="${CT_STOP}" # We need to do something special with the log file! if [ "${CT_LOG_TO_FILE}" = "y" ]; then exec >"${state_dir}/tail.log" fi - CT_DoLog DEBUG "Restoring state at step \"${state_name}\"..." + CT_DoLog INFO "Restoring state at step \"${state_name}\", as requested." case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in y) tar_opt=xzf; tar_ext=".tar.gz";; @@ -551,6 +553,11 @@ CT_DoLoadState(){ CT_DoLog DEBUG " Restoring environment" . "${state_dir}/env.sh" >/dev/null 2>&1 || true + # Restore the new RESTART and STOP steps + CT_RESTART="${old_RESTART}" + CT_STOP="${old_STOP}" + unset old_stop old_restart + if [ "${CT_LOG_TO_FILE}" = "y" ]; then CT_DoLog DEBUG " Restoring log file" exec >/dev/null |