wok-6.x diff syslinux/stuff/iso2exe/init @ rev 13699

syslinux/iso2exe: only DOS 3, 4 and 6 supported :-/
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Dec 15 13:43:51 2012 +0100 (2012-12-15)
parents db0eb389448c
children 9d2380009b81
line diff
     1.1 --- a/syslinux/stuff/iso2exe/init	Fri Dec 14 22:52:32 2012 +0000
     1.2 +++ b/syslinux/stuff/iso2exe/init	Sat Dec 15 13:43:51 2012 +0100
     1.3 @@ -4,7 +4,7 @@
     1.4  
     1.5  get()
     1.6  {
     1.7 -	od -j $1 -N ${3:-4} -t u${3:-4} -An $2
     1.8 +	od -j $1 -N ${3:-2} -t u${3:-2} -An $2
     1.9  }
    1.10  
    1.11  getarg()
    1.12 @@ -15,8 +15,8 @@
    1.13  gettazboot()
    1.14  {
    1.15  	echo "Creating $(basename $1) ..."
    1.16 -	O=$(($(get 34 /mnt/$ISO 2) - 0xE0))
    1.17 -	L=$((0x8000 - $(get 28 /mnt/$ISO 2) - $O))
    1.18 +	O=$(($(get 34 /mnt/$ISO) - 0xE0))
    1.19 +	L=$((0x8000 - $(get 28 /mnt/$ISO) - $O))
    1.20  	S=$((32+$L))
    1.21  	P=$((($S+511)/512))
    1.22  	E=$((4096-(32*$P)))
    1.23 @@ -30,7 +30,7 @@
    1.24  
    1.25  checkmagic()
    1.26  {
    1.27 -	[ -s $1 ] && [ $(getarg magic) == $(get 28 $1) ]
    1.28 +	[ -s $1 ] && [ $(getarg magic) == $(get 28 $1 4) ]
    1.29  }
    1.30  
    1.31  getiso()
    1.32 @@ -52,7 +52,7 @@
    1.33  uncpio()
    1.34  {
    1.35  	echo "Extracting $(basename $1) ..."
    1.36 -	case $(get 0 $1 2) in
    1.37 +	case $(get 0 $1) in
    1.38  	*35615)	zcat $1 ;;
    1.39  	*\ 93)	unlzma -c $1 ;;
    1.40  	*)	cat $1 ;;
    1.41 @@ -291,11 +291,11 @@
    1.42  Please plug your USB stick in now.\n 
    1.43  " 18 70
    1.44  	[ $? -eq 0 ] || return
    1.45 +	sleep 5
    1.46  	DEV="$(grep -l 1 /sys/block/*/removable | \
    1.47  		sed 's|/sys/block/\(.*\)/removable|\1|')"
    1.48  	[ -n "$DEV" ] || return
    1.49  	exec 3>&1
    1.50 -	sleep 5
    1.51  	device=`$DIALOG  --clear \
    1.52  	--title " Select your USB key " \
    1.53  	--menu "\nPlease select the USB key according to its known size.\n\n" \
    1.54 @@ -312,11 +312,11 @@
    1.55  	--title " Select the filesystem " \
    1.56  	--menu "\nPlease select the filesystem type to create.\n\n\
    1.57  The filesystem creation will erase all the data \
    1.58 -on the USB key." 14 70 4 \
    1.59 +in the USB key." 14 70 4 \
    1.60  		"none"	"Do not erase the USB key" \
    1.61  		"ext3"	"Ext3 journaling filesystem" \
    1.62  		"ext2"	"Ext2 filesystem" \
    1.63 -		"fat32"	"Window FAT32 filesystem" \
    1.64 +		"fat32"	"Windows FAT32 filesystem" \
    1.65  	2>&1 1>&3`
    1.66  	retval=$?
    1.67  	exec 3>&-