# Get it
cd
test -f installed/multitail-6.0.tgz && mv -f installed/multitail-6.0.tgz .
test ! -f multitail-6.0.tgz &&
wget http://www.vanheusden.com/multitail/multitail-6.0.tgz
# Extract the source
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "multitail-*" -exec rm -r {} \;
tar xzvf ~/multitail-6.0.tgz
cd multitail-6.0
test $UID = 0 && chown -R root:root .
# Build it
make CONFIG_FILE=/usr/local/etc/multitail/multitail.conf
# To set up a new multitail.conf, copy the *.dist one to multitail.conf
test ! -f /usr/local/etc/multitail/multitail.conf &&
cp -a /usr/local/etc/multitail/multitail.conf.dist \
/usr/local/etc/multitail/multitail.conf
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/multitail-*.tgz
mv multitail-6.0.tgz installed/
# If you ever want to uninstall multitail, this should do it:
cd
su
test -d src/multitail-* && ( cd src/multitail-* ; make uninstall )
test -d /usr/local/doc/multitail-6.0 && rm -r /usr/local/doc/multitail-6.0
test -d /usr/local/etc/multitail && rm -r /usr/local/etc/multitail
rm -f /usr/local/bin/multitail /usr/local/man/man1/multitail.1.gz
exit
find ~/src -maxdepth 1 -type d -name "multitail-*" -exec rm -r {} \;
rm -f ~/installed/multitail-*.tar.*