[Debian-live-changes] r1161 - dists/trunk/live-helper/functions
Daniel Baumann
daniel at alioth.debian.org
Wed Apr 25 15:24:56 UTC 2007
Author: daniel
Date: 2007-04-25 15:24:56 +0000 (Wed, 25 Apr 2007)
New Revision: 1161
Modified:
dists/trunk/live-helper/functions/stagefile.sh
Log:
Modified: dists/trunk/live-helper/functions/stagefile.sh
===================================================================
--- dists/trunk/live-helper/functions/stagefile.sh 2007-04-25 15:24:41 UTC (rev 1160)
+++ dists/trunk/live-helper/functions/stagefile.sh 2007-04-25 15:24:56 UTC (rev 1161)
@@ -47,13 +47,28 @@
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
}
More information about the Debian-live-changes
mailing list