# I got Forbidden with wget, but it worked with Firefox and curl.
# Use something else to get it:
# curl -o jpilot-0.99.8.tar.gz http://jpilot.org/jpilot-0.99.8.tar.gz
# lynx -dump -source http://jpilot.org/jpilot-0.99.8.tar.gz > jpilot-0.99.8.tar.gz
cd
test -f installed/jpilot-0.99.8.tar.gz &&
mv installed/jpilot-0.99.8.tar.gz .
test ! -f jpilot-0.99.8.tar.gz &&
wget http://jpilot.org/jpilot-0.99.8.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "jpilot-*" -exec rm -r {} \;
tar xzvf ~/jpilot-0.99.8.tar.gz
cd jpilot-0.99.8
test $UID = 0 && chown -R root:root .
# Apply this patch to fix unresolved symbol glob_tooltips when using
# jpilot-sync
wget -nc http://jpilot.org/patch.jpilot-sync &&
patch -p0 < patch.jpilot-sync
# Apply this patch to fix a memory problem resulting in a segfault when
# modifying records
wget -nc http://jpilot.org/patch.0.99.8-memory &&
patch -p0 < patch.0.99.8-memory