Fix logic problem with RUN_STAGE and MAX_STAGE both specified

pull/21/head
Greg MacLellan 2016-09-29 22:54:34 -04:00
parent 0b00ca2970
commit 3ad5bce2ae
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ log "Begin ${BASE_DIR}"
for STAGE_DIR in ${BASE_DIR}/stage*; do
STAGE_DIR_NUM=$(echo $STAGE_DIR | grep -o -E "[0-9]+$")
if [[ (-n $RUN_STAGE && $STAGE_DIR_NUM -eq $RUN_STAGE) && $STAGE_DIR_NUM -le $MAX_STAGE ]]; then
if [[ (-z $RUN_STAGE || $STAGE_DIR_NUM -eq $RUN_STAGE) && $STAGE_DIR_NUM -le $MAX_STAGE ]]; then
run_stage
else
echo "Skipping ${STAGE_DIR}"