From: Thierry Parmentelat Date: Wed, 16 Jan 2008 10:03:57 +0000 (+0000) Subject: Passing a custom-dir without setting serial was not working X-Git-Tag: bootcd-3.4-3~3 X-Git-Url: http://git.onelab.eu/?p=bootcd.git;a=commitdiff_plain;h=bd5737263495465dd01f81b4ad6d2f6979c2a474 Passing a custom-dir without setting serial was not working Fixed/protected arg passing among functions + formatting, marginally --- diff --git a/build.sh b/build.sh index a1f1cce..7687728 100755 --- a/build.sh +++ b/build.sh @@ -18,6 +18,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin CONFIGURATION=default NODE_CONFIGURATION_FILE= TYPES="usb iso usb_serial iso_serial" +ALL_TYPES="usb iso usb_serial iso_serial usb_cramfs iso_cramfs usb_cramfs_serial iso_cramfs_serial" # Leave 4 MB of free space FREE_SPACE=4096 CUSTOM_DIR= @@ -30,6 +31,7 @@ usage() echo " -c name (Deprecated) Static configuration to use (default: $CONFIGURATION)" echo " -f planet.cnf Node to customize CD for (default: none)" echo " -t 'types' Build the specified images (default: $TYPES)" + echo " All known types: $ALL_TYPES" echo " -a Build all supported images" echo " -C custom-dir Custom directory" echo " -O output-base The basename of the generated files (default: PLC_NAME-BootCD-VERSION)" @@ -56,7 +58,7 @@ while getopts "O:c:f:t:C:ah" opt ; do OUTPUT_BASE="$OPTARG" ;; a) - TYPES="usb iso usb_serial iso_serial usb_cramfs iso_cramfs usb_cramfs_serial iso_cramfs_serial" + TYPES="$ALL_TYPES" ;; h|*) usage @@ -274,9 +276,9 @@ popd function build_iso() { - local iso="$1" - local serial=$2 - local custom=$3 + local iso="$1" ; shift + local serial="$1" ; shift + local custom="$1" # Write isolinux configuration cat >$isofs/isolinux.cfg <${BUILDTMP}/mtools.conf<${BUILDTMP}/mtools.conf<