wok-current annotate dev86/stuff/com2exe @ rev 24737
updated libevdev and libevdev-dev (1.9.0 -> 1.12.0)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Mar 16 09:39:00 2022 +0100 (2022-03-16) |
parents | 19fbe1c329d0 |
children |
rev | line source |
---|---|
pascal@13117 | 1 #!/bin/sh |
pascal@13117 | 2 |
pascal@13225 | 3 [ ! -s "$1" ] && echo "Usage: $0 file.com [extra_ss]> file.exe" && exit 1 |
pascal@13225 | 4 S=$((32+$(stat -c %s $1))) |
pascal@13117 | 5 P=$((($S+511)/512)) |
pascal@13117 | 6 E=$((4096-(32*$P))) |
pascal@17156 | 7 for i in 0x5A4D $(($S%512)) $P 0 2 $E -1 $((${2:-0}-16)) -2 0 256 -16 28 0x6C53 0x5469 0x7A61 |
pascal@13117 | 8 do printf '\\\\x%02X\\\\x%02X' $(($i&255)) $((($i>>8)&255)) | xargs echo -en |
pascal@13117 | 9 done |
pascal@13117 | 10 cat $1 |