From 0762ca14335f5b75cf6238eb3d0501529ad27f49 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 26 Jan 2017 17:55:17 -0800 Subject: [PATCH] Add support for running fewer than three stages. --- etc/run-three-stages | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) 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 -- 2.25.1