Added some small boring scripts and programs writen in few last years
[mirrors/Programs.git] / bash / infect / test.sh
1 #!/bin/sh
2 skip=23
3 set -C
4 umask=`umask`
5 umask 77
6 tmpfile=`tempfile -p gztmp -d /tmp` || tmpfile=/tmp/gztmp.$$ || exit 1
7 if /usr/bin/tail -n +$skip "$0" | /bin/gzip -cd >> $tmpfile; then
8 umask $umask
9 /bin/chmod 700 $tmpfile
10 prog="`echo $0 | /bin/sed 's|^.*/||'`"
11 if /bin/ln $tmpfile "/tmp/$prog" 2>/dev/null; then
12 trap '/bin/rm -f $tmpfile "/tmp/$prog"; exit $res' 0
13 (/bin/sleep 5; /bin/rm -f $tmpfile "/tmp/$prog") 2>/dev/null &
14 /tmp/"$prog" ${1+"$@"}; res=$?
15 else
16 trap '/bin/rm -f $tmpfile; exit $res' 0
17 (/bin/sleep 5; /bin/rm -f $tmpfile) 2>/dev/null &
18 $tmpfile ${1+"$@"}; res=$?
19 fi
20 else
21 echo Cannot decompress $0; exit 1
22 fi; exit $res
23 \1f\8b\b\b\b6WG\ 2\ 3test.sh
This page took 0.246433 seconds and 4 git commands to generate.