1# -*- shell-script -*- 2message testing to self extracting archive 3 4if test -c /dev/zero; then 5 # Usually, size of SFX code is less than 20K 6 dd if=/dev/zero of=test-tmp-hg.exe bs=1024 count=20 2>/dev/null 7else 8 # dummy header 9 echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > test-tmp-hg.exe 10fi 11 check $? $LINENO 12cp test-tmp-hg.exe test-tmp-h0.exe && 13cp test-tmp-hg.exe test-tmp-h1.exe && 14cp test-tmp-hg.exe test-tmp-h2.exe 15 check $? $LINENO 16# generic header 17$lha cg - test-[abc] >> test-tmp-hg.exe 18 check $? $LINENO 19$lha vv test-tmp-hg.exe 20 check $? $LINENO 21$lha xw=test-tmp-hg test-tmp-hg.exe 22 check $? $LINENO 23diff -r test-1 test-tmp-hg 24 check $? $LINENO 25 26# level 0 header 27$lha c0 - test-[abc] >> test-tmp-h0.exe 28 check $? $LINENO 29$lha vv test-tmp-h0.exe 30 check $? $LINENO 31$lha xw=test-tmp-h0 test-tmp-h0.exe 32 check $? $LINENO 33diff -r test-1 test-tmp-h0 34 check $? $LINENO 35 36# level 1 header 37$lha c1 - test-[abc] >> test-tmp-h1.exe 38 check $? $LINENO 39$lha vv test-tmp-h1.exe 40 check $? $LINENO 41$lha xw=test-tmp-h1 test-tmp-h1.exe 42 check $? $LINENO 43diff -r test-1 test-tmp-h1 44 check $? $LINENO 45 46# level 2 header 47$lha c2 - test-[abc] >> test-tmp-h2.exe 48 check $? $LINENO 49$lha vv test-tmp-h2.exe 50 check $? $LINENO 51$lha xw=test-tmp-h2 test-tmp-h2.exe 52 check $? $LINENO 53diff -r test-1 test-tmp-h2 54 check $? $LINENO 55