# Get it
cd
test -f installed/valgrind-3.14.0.tar.bz2 &&
mv -f installed/valgrind-3.14.0.tar.bz2 .
test ! -f valgrind-3.14.0.tar.bz2 &&
wget http://valgrind.org/downloads/valgrind-3.14.0.tar.bz2
# It doesn't seem to listen to --docdir so move the files to the intended
# location
test -d /usr/local/share/doc/valgrind &&
mv -f /usr/local/share/doc/valgrind /usr/local/doc/valgrind-3.14.0
# Test run it
valgrind ls -l
# Become your non-root user again
exit
# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/valgrind-*.tar.*
mv valgrind-3.14.0.tar.bz2 installed/
# If you ever want to uninstall Valgrind, this should do it:
cd
su
test -d src/valgrind-* && ( cd src/valgrind-* ; make uninstall )
( cd /usr/local/bin
rm -f callgrind_annotate callgrind_control cg_annotate cg_diff cg_merge \
ms_print valgrind valgrind-di-server valgrind-listener vgdb )
test -d /usr/local/doc/valgrind && rm -r /usr/local/doc/valgrind
find /usr/local/doc -maxdepth 1 -type d -name "valgrind-*" -exec rm -r {} \;
test -d /usr/local/include/valgrind && rm -r /usr/local/include/valgrind
for libdir in /usr/local/lib /usr/local/lib64;
do
test ! -d $libdir && continue
test -d ${libdir}/valgrind && rm -r ${libdir}/valgrind
rm -f ${libdir}/pkgconfig/valgrind.pc
done
( cd /usr/local/man/man1
rm -f callgrind_annotate.1 callgrind_control.1 cg_annotate.1 cg_diff.1 \
cg_merge.1 ms_print.1 valgrind-listener.1 valgrind.1 vgdb.1 )
test -d /usr/local/share/doc/valgrind &&
rm -r /usr/local/share/doc/valgrind
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "valgrind-*" -exec rm -r {} \;
rm -f ~/installed/valgrind-*.tar.*