# sysfsutils 2.1.0
# ================
cd
test -f installed/sysfsutils-2.1.0.tar.gz &&
mv installed/sysfsutils-2.1.0.tar.gz .
test ! -f sysfsutils-2.1.0.tar.gz &&
wget http://download.sf.net/linux-diag/sysfsutils-2.1.0.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "sysfsutils-*" -exec rm -r {} \;
tar xzvf ~/sysfsutils-2.1.0.tar.gz
cd sysfsutils-2.1.0
test $UID = 0 && chown -R root:root .
./configure
make
su -c "make install ; ldconfig"
cd
mkdir -p -m 0700 installed
rm -f installed/sysfsutils-*.tar.*
mv sysfsutils-2.1.0.tar.gz installed/
# If you ever need to uninstall sysfsutils, this should do it:
cd
su
test -d src/sysfsutils-2.1.0 &&
( cd src/sysfsutils-2.1.0 ; make uninstall )
( cd /usr/local/bin ; rm -f dlist_test get_bus_devices_list \
get_class_dev get_classdev_parent get_device get_driver \
systool testlibsysfs write_attr )
( cd /usr/include/sysfs ; rm -f dlist.h libsysfs.h )
rm -f /usr/local/lib/libsysfs.* /usr/local/man/man1/systool.1
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "sysfsutils-*" -exec rm -r {} \;
rm -f ~/installed/sysfsutils-*.tar.*