cd
test -f installed/pktstat-1.8.4.tar.gz &&
mv installed/pktstat-1.8.4.tar.gz .
test ! -f pktstat-1.8.4.tar.gz &&
wget http://www.adaptive-enterprises.com.au/~d/software/pktstat/\
pktstat-1.8.4.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "pktstat-*" -exec rm -r {} \;
tar xzvf ~/pktstat-1.8.4.tar.gz
cd pktstat-1.8.4
test $UID = 0 && chown -R root:root .
./configure
make
su -c "make install"
cd
mkdir -p -m 0700 installed
rm -f installed/pktstat-*.tar.*
mv pktstat-1.8.4.tar.gz installed/
# If you ever want to uninstall pktstat, this should do it:
cd
su
test -d src/pktstat-* && ( cd src/pktstat-* ; make uninstall )
rm -f /usr/local/bin/pktstat /usr/local/man/man1/pktstat.1
exit
find ~/src -maxdepth 1 -type d -name "pktstat-*" -exec rm -r {} \;
rm -f ~/installed/pktstat-*.tar.*