wok view dev86/stuff/com2exe @ rev 18150
Up: pcmanfm,libfm(git), libtasn1(4.5)
to exclude builtin libtasn1 from libgnutls* , no more rebuilds needed
to exclude builtin libtasn1 from libgnutls* , no more rebuilds needed
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Fri Jun 19 19:56:46 2015 +0200 (2015-06-19) |
parents | 19fbe1c329d0 |
children |
line source
1 #!/bin/sh
3 [ ! -s "$1" ] && echo "Usage: $0 file.com [extra_ss]> file.exe" && exit 1
4 S=$((32+$(stat -c %s $1)))
5 P=$((($S+511)/512))
6 E=$((4096-(32*$P)))
7 for i in 0x5A4D $(($S%512)) $P 0 2 $E -1 $((${2:-0}-16)) -2 0 256 -16 28 0x6C53 0x5469 0x7A61
8 do printf '\\\\x%02X\\\\x%02X' $(($i&255)) $((($i>>8)&255)) | xargs echo -en
9 done
10 cat $1