From: Ian Campbell Date: Wed, 5 Nov 2014 10:41:24 +0000 (+0000) Subject: standalone: Handle multiple configuration files. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=feefea073e42528e63a0cc4cc0c1b6e1c2d8c895;p=people%2Fdariof%2Fosstest.git standalone: Handle multiple configuration files. OSSTEST_CONFIG can actually be a colon separate list of files, so take this into account when sanity checking it. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- diff --git a/standalone b/standalone index c1139f8..caf3fd5 100755 --- a/standalone +++ b/standalone @@ -112,10 +112,19 @@ if [ ! -f standalone.db ] ; then exit 1 fi -if [ -z "$config" -o ! -r "$config" ] ; then - echo "Cannot read config." >&2 +if [ -z "$config" ] ; then + echo "No config specified." >&2 exit 1 fi +IFS_saved=$IFS +IFS=: +for c in $config ; do + if [ -z "$c" -o ! -r "$c" ] ; then + echo "Cannot read config $c." >&2 + exit 1 + fi +done +IFS=$IFS_saved need_flight() { if [ -z "$flight" ] ; then