stagefiles: only list missing stages
This commit is contained in:
parent
3bed138fda
commit
fe0d2358b9
|
@ -72,20 +72,24 @@ Require_stagefile ()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local FILE
|
local FILE
|
||||||
local MISSING=false
|
local MISSING=""
|
||||||
|
local MISSING_MULTIPLE=false
|
||||||
for FILE in ${@}; do
|
for FILE in ${@}; do
|
||||||
if [ ! -f ".build/${FILE}" ]; then
|
if [ ! -f ".build/${FILE}" ]; then
|
||||||
MISSING=true
|
if [ -n "${MISSING}" ]; then
|
||||||
|
MISSING_MULTIPLE=true
|
||||||
|
fi
|
||||||
|
MISSING="${MISSING:+$MISSING }${FILE}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if ! $MISSING; then
|
if [ -z "${MISSING}" ]; then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $# -eq 1 ]; then
|
if ! $MISSING_MULTIPLE; then
|
||||||
Echo_error "the following stage is required to be completed first: %s" "${FILE}"
|
Echo_error "the following stage is required to be done first: %s" "${MISSING}"
|
||||||
else
|
else
|
||||||
Echo_error "the following stages are required to be completed first: %s" "$(echo ${@})"
|
Echo_error "the following stages are required to be completed first: %s" "${MISSING}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue