wok-next diff memtest/stuff/pack @ rev 17387
mygestures: remove invisible symbols from description
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Nov 27 13:42:41 2014 +0200 (2014-11-27) |
parents | bd4321dee983 |
children | d9bf18af0e57 |
line diff
1.1 --- a/memtest/stuff/pack Sun Nov 10 11:19:32 2013 +0000 1.2 +++ b/memtest/stuff/pack Thu Nov 27 13:42:41 2014 +0200 1.3 @@ -1,10 +1,6 @@ 1.4 #!/bin/sh 1.5 if [ "$1" == "--build" ]; then 1.6 set -- ${2:-bootloader.bin} ${3:-unpack.bin} 1.7 - cat >> $0 <<EOM 1.8 -$(dd if=$1 bs=512 count=1 conv=sync | cat - $2 | gzip -9 | uuencode -m -) 1.9 -EOT 1.10 -EOM 1.11 x=$(grep -s packed_syssize ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') 1.12 [ -n "$x" ] && sed -i "s/XXXP/$((513+0x$x))/" $0 || sed -i s="/XXXP$/d" $0 1.13 x=$(grep -s original_syssize ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') 1.14 @@ -12,8 +8,13 @@ 1.15 x=$(grep -s original_setupsize ${2/.bin/.lst}|sed '$!d;s/.*t:\([^ ]*\).*/\1/') 1.16 [ -n "$x" ] && sed -i "s/XXXS/$((516+0x$x))/" $0 || sed -i s="/XXXS$/d" $0 1.17 helpmsg=$(sed '/helpmsg:/!d{n;s/ [0-9]* \([^ ]*\).*/\1/}' ${1/.bin/.lst} | sed '$!d') 1.18 + helpend=$(sed '/helpend:/!d{n;s/ [0-9]* \([^ ]*\).*/\1/}' ${1/.bin/.lst} | sed '$!d') 1.19 sed -i "s/YYY/$((0x$helpmsg))/" $0 1.20 - sed -i "s/ZZZ/$((496-0x$helpmsg))/" $0 1.21 + sed -i "s/ZZZ/$((0x$helpend-0x$helpmsg))/" $0 1.22 + cat >> $0 <<EOM 1.23 +$(dd if=$1 bs=512 count=1 conv=sync | cat - $2 | gzip -9 | uuencode -m -) 1.24 +EOT 1.25 +EOM 1.26 sed -i '/--build/,/^fi/d' $0 1.27 exit 1.28 fi 1.29 @@ -54,8 +55,8 @@ 1.30 } 1.31 1.32 HELP="$(unix2dos <<EOT 1.33 -Memtest86+ is an endless advanced memory diagnostic tool released under the 1.34 -terms of the Gnu Public License (GPL). 1.35 +Memtest86+ VERSION is an endless advanced memory diagnostic tool released under 1.36 +the terms of the free Gnu Public License (GPL). 1.37 1.38 EOT 1.39 )"