From: Chris Hanson Date: Fri, 27 Jan 2017 01:55:17 +0000 (-0800) Subject: Add support for running fewer than three stages. X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~67 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0762ca14335f5b75cf6238eb3d0501529ad27f49;p=mit-scheme.git Add support for running fewer than three stages. --- diff --git a/etc/run-three-stages b/etc/run-three-stages index ff7a0274f..a4cd60f88 100755 --- a/etc/run-three-stages +++ b/etc/run-three-stages @@ -41,6 +41,26 @@ if ! [[ -d .git && -d src && -d etc ]]; then exit 1 fi +if (( ${#} > 0 )); then + case ${1} in + -1) + MAX_STAGE=1 + shift + ;; + -2) + MAX_STAGE=2 + shift + ;; + -3) + MAX_STAGE=3 + shift + ;; + *) + MAX_STAGE=3 + ;; + esac +fi + CONFIG_ARGS=("${@}") # Hack for cph @@ -122,5 +142,5 @@ find_dist_stage () rm -rf stage[123] run_stage 1 -run_stage 2 -run_stage 3 +(( ${MAX_STAGE} >= 2 )) && run_stage 2 +(( ${MAX_STAGE} >= 3 )) && run_stage 3