wok rev 18820

syslinux/iso2exe.sh: -f should keep flavor info
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 16 10:28:02 2016 +0100 (2016-01-16)
parents c7214cd99f9b
children 1945b5221729
files syslinux/stuff/iso2exe/iso2exe.sh
line diff
     1.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh	Sat Jan 16 09:17:41 2016 +0000
     1.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh	Sat Jan 16 10:28:02 2016 +0100
     1.3 @@ -150,6 +150,9 @@
     1.4  		 dosstub rootfs.gz tazboot.com md5 ; do
     1.5  		fileofs $f
     1.6  		[ $SIZE -eq 0 ] && continue
     1.7 +		[ -n "${OFFSET:6}" ] && continue
     1.8 +		[ $OFFSET -lt 0 ] && continue
     1.9 +		[ $(get $OFFSET $ISO 2) -eq 0 ] && continue
    1.10  		echo -n "$f at $(printf "%X\n" $OFFSET)"
    1.11  		[ $SIZE -eq -1 ] || echo -n " ($SIZE bytes)"
    1.12  		echo .
    1.13 @@ -360,7 +363,7 @@
    1.14  or: $0 --extract-custom-config image.iso
    1.15  EOT
    1.16  	case "${2/--/-}" in
    1.17 -	-u*|-r*|-w*)
    1.18 +	-u*|-r*|-w*|-f*)
    1.19  	    case "$(get 0 $1)" in
    1.20  	    23117)
    1.21  		b=$(get 417 $1 1)
    1.22 @@ -371,11 +374,13 @@
    1.23  		ddq if=/dev/zero bs=1 seek=$n count=$((0x8000 - $n)) of=$1 conv=notrunc ;;
    1.24  	    *)  ddq if=/dev/zero bs=1k count=32 of=$1 conv=notrunc ;;
    1.25  	    esac
    1.26 -	    clear_custom_config $1
    1.27 -	    exit 0 ;;
    1.28 -	-f*)
    1.29 -	    ddq if=/dev/zero bs=1k count=32 of=$1 conv=notrunc
    1.30 -	    [ "$append$initrd" ] && clear_custom_config $1
    1.31 +	    case "${2/--/-}" in
    1.32 +	    -f*)
    1.33 +		[ "$append$initrd" ] && clear_custom_config $1 ;;
    1.34 +	    *)
    1.35 +		clear_custom_config $1
    1.36 +		exit 0 ;;
    1.37 +	    esac
    1.38  	esac
    1.39  	case "$(get 0 $1)" in
    1.40  	23117)	echo "The file $1 is already an EXE file." 1>&2 && exit 1;;