cd
test -f installed/hardinfo-0.4.1.tar.bz2 &&
mv installed/hardinfo-0.4.1.tar.bz2 .
test ! -f hardinfo-0.4.1.tar.bz2 &&
wget http://download.berlios.de/hardinfo/hardinfo-0.4.1.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "hardinfo-*" -exec rm -r {} \;
tar xjvf ~/hardinfo-0.4.1.tar.bz2
cd hardinfo-0.4.1
test $UID = 0 && chown -R root:root .
./configure
make
su -c "make install"
cd
mkdir -p -m 0700 installed
rm -f installed/hardinfo-*.tar.*
mv hardinfo-0.4.1.tar.bz2 installed/
# /usr/share/hardinfo/pixmaps/logo.png can be used as a desktop icon
# If you ever want to uninstall hardinfo, this should do it:
su
rm -f /usr/bin/hardinfo /usr/share/applications/hardinfo.desktop
test -d /usr/lib/hardinfo && rm -r /usr/lib/hardinfo
test -d /usr/share/hardinfo && rm -r /usr/share/hardinfo
exit
find ~/src -maxdepth 1 -type d -name "hardinfo-*" -exec rm -r {} \;
rm -f ~/installed/hardinfo-*.tar.*