diff --git a/scripts/Create-ISO b/scripts/Create-ISO index d68353080..97e759227 100755 --- a/scripts/Create-ISO +++ b/scripts/Create-ISO @@ -13,10 +13,11 @@ # If you want to add multiple 'BOOT' lines, use the tag-name 'BOOTx' for # the 2nd and all further lines. # -# SCRIPT script-name Run given script on each image +# SCRIPT script-name args Run given script for each image # # Intended for image post-processing - like needed for IBM RS/6k boot -# blessing. The first argument is the CD number - the second the image file. +# blessing. The first attached argument is the CD number and the second +# the image file. # if [ $# -eq 0 ] ; then @@ -61,6 +62,8 @@ for cfg ; do then rm -f $dat $index ; exit 1 ; fi done +# function to add a given file $1 to the place $2 on the resulting ISO +# add() { local from="$1" to="$2" done=0 if [ ! -f "$from" -a ! -d "$from" ] ; then @@ -103,7 +106,7 @@ while read tag data ; do bootoptions="$data" fi elif [ $tag = SCRIPT ] ; then - scritps="$scripts '$data'" + scripts="$scripts $data" fi done < $dat while read tag data ; do @@ -211,13 +214,12 @@ for x in $disks ; do xxx -q -r -T -J -l -o ${isoprefix}_cd$x.iso -A "ROCK Linux - Disk $x" \ -P 'The ROCK Linux Project - http://www.rocklinux.org' \ $bootoptions -graft-points disk$x.txt=$dat $disk_0_data ${!dd} + bootoptions="" if [ "$scripts" ] ; then echo "Running post-processing scripts on image ..." - for script in $scripts ; do - sh $script $x ${isoprefix}_cd$x.iso - done + eval $scripts $x ${isoprefix}_cd$x.iso fi if [ "$mkdebug" = 1 ] ; then