# Clean up leftovers from the acidrip howto:
cd
test -d src/acidrip &&
find src/acidrip -type d -maxdepth 1 -name "lsdvd-*" -exec rm -r {} \;
test -d installed/acidrip && rm -f installed/acidrip/lsdvd-*
cd
test -f installed/lsdvd-0.16.tar.gz &&
mv installed/lsdvd-0.16.tar.gz .
test ! -f lsdvd-0.16.tar.gz &&
wget http://download.sf.net/acidrip/lsdvd-0.16.tar.gz
mkdir -p -m 0700 src
cd src
find -type d -maxdepth 1 -name "lsdvd-*" -exec rm -r {} \;
tar xzvf ~/lsdvd-0.16.tar.gz
cd lsdvd-0.16
test $UID = 0 && chown -R root:root .
# Patch it to allow the configure test to work with libdvdread 0.9.7:
wget -nc http://englanders.cc/pub/linux/patches/lsdvd-0.16.patch &&
patch -p1 < lsdvd-0.16.patch
autoreconf -f -i
./configure
make
su -c "make install"
cd
rm -f installed/lsdvd-*.tar.*
mv lsdvd-0.16.tar.gz installed/
# If you ever want to uninstall lsdvd, this should do it:
cd
su
test -d src/lsdvd-* && ( cd src/lsdvd-* ; make uninstall )
rm -f /usr/local/bin/lsdvd /usr/local/man/man1/lsdvd.1 \
/usr/local/share/man/man1/lsdvd.1
exit
find ~/src -maxdepth 1 -type d -name "lsdvd-*" -exec rm -r {} \;
rm -f ~/installed/lsdvd-*.tar.*