#!/bin/sh
head -n 1 $0 > $1.exe
cp $1 /tmp/~; rm /tmp/~.bz2; bzip2 -9 /tmp/~
echo tail -c `wc --bytes < /tmp/~.bz2` "\$0|bunzip2 >~/~;chmod +x ~/~;~/~ \$*;rm ~/~;exit" >> $1.exe
cat /tmp/~.bz2 >> $1.exe; rm /tmp/~.bz2; chmod +x $1.exe
exit
