wok view linld/stuff/upx.sh @ rev 19857

syslinux/iso2exe: fix recursive_partition + hybrib_mbr
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 18 09:21:47 2017 +0100 (2017-03-18)
parents 052a6e449318
children fa2037599fb8
line source
1 #!/bin/sh
3 upx -5 $1
4 o=$(($(stat -c %s $1) - 15))
5 if dd bs=1 skik=$o if=$1 count=15 2> /dev/null | hd | \
6 grep -iq "2c e8 3c 01 77 f9 c1 04 08 29 34 ad e2 f1 c3"; then
7 echo "0 3C E8 75 FB 89 F7 AD 86 E0 29 F8 AB |" | hexdump -R | \
8 dd bs=1 seek=$o of=$1 conv=notrunc 2> /dev/null
9 else
10 upx -d $1 > /dev/null 2>&1
11 upx -5 --8086 $1
12 fi