if [ "$UID" != "0" ]; then
    echo "In order to install this driver please run it as root"
    echo "eg. $ sudo $0"
    exit 0;
fi
[...]
app=$0
[...]
echo "installing em28xx driver to /opt"
echo "unpacking..."
dd if=${app} of=/tmp/installer.tar.gz skip=1 ibs=4635 bs=4635 obs=4635 2> /dev/null
cd /tmp
tar xzf installer.tar.gz
echo -n "checking system... "
/tmp/chk64 1>/dev/null 2>&1
if [ "$?" = "0" ]; then
    echo "64Bit System detected"
    SYSTEM="64bit"
else
    [...]
fi