diff options
author | Daniel Baumann <daniel@debian.org> | 2007-09-23 10:04:52 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:18:29 +0100 |
commit | bd1a5ddc8203907eb40135303bea5488397ec5d0 (patch) | |
tree | e1cdc0adec3e4799f5db5ad1a8b34800e28a9439 /functions/stagefile.sh | |
parent | 8a4a50fdb6b206fbff62fd3043ed388f25a0ffb1 (diff) | |
download | live-build-bd1a5ddc8203907eb40135303bea5488397ec5d0.zip live-build-bd1a5ddc8203907eb40135303bea5488397ec5d0.tar.gz |
Adding live-helper 1.0~a8-1.
Diffstat (limited to 'functions/stagefile.sh')
-rwxr-xr-x | functions/stagefile.sh | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/functions/stagefile.sh b/functions/stagefile.sh index a570ea2..b4938cc 100755 --- a/functions/stagefile.sh +++ b/functions/stagefile.sh @@ -47,13 +47,28 @@ Create_stagefile () Require_stagefile () { - FILE="${1}" - NAME="`basename ${1}`" + FILES="${@}" + NUMBER="`echo ${@} | wc -w`" - # Checking stage file - if [ ! -f "${FILE}" ] + for FILE in ${FILES} + do + # Find at least one of the required stages + if [ -f ${FILE} ] + then + CONTINUE="true" + NAME="${NAME} `basename ${FILE}`" + fi + done + + if [ "${CONTINUE}" != "true" ] then - Echo_error "${NAME} missing" + if [ "${NUMBER}" -gt 1 ] + then + Echo_error "one of ${NAME} is missing" + else + Echo_error "${NAME} missing" + fi + exit 1 fi } |