# cabextract 1.4
# ==============
# This uses a bundled version of libmspack
# Get it
cd
test -f installed/cabextract-1.4.tar.gz &&
mv installed/cabextract-1.4.tar.gz .
test ! -f cabextract-1.4.tar.gz &&
wget http://www.cabextract.org.uk/cabextract-1.4.tar.gz
# Extract the source
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "cabextract-*" -exec rm -r {} \;
tar xzvf ~/cabextract-1.4.tar.gz
cd cabextract-1.4
test $UID = 0 && chown -R root:root .
# Configure the build
./configure
# Build it
make
# Install it
su -c "make install"
# Save the tarball for later
cd
mkdir -p -m 0700 installed
rm -f installed/cabextract-*.tar.*
mv cabextract-1.4.tar.gz installed/
# If you ever want to uninstall cabextract, this should do it:
cd
su
test -d src/cabextract-* && ( cd src/cabextract-* ; make uninstall )
rm -f /usr/local/bin/cabextract /usr/local/man/man1/cabextract.1
exit
find ~/src -maxdepth 1 -type d -name "cabextract-*" -exec rm -r {} \;
rm -f ~/installed/cabextract-*.tar.*