cd
test -f installed/joe-3.7.tar.gz && mv installed/joe-3.7.tar.gz .
test ! -f joe-3.7.tar.gz &&
wget http://downloads.sf.net/joe-editor/joe-3.7.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "joe-*" -exec rm -r {} \;
tar xzvf ~/joe-3.7.tar.gz
cd joe-3.7
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr --sysconfdir=/etc
make
# Become root to backup files, clean up old files, and install it
su
# If your previous joe installation was installed into /usr/local:
rm -f /usr/bin/joe /usr/bin/rjoe /usr/local/bin/joe /usr/local/bin/rjoe \
/usr/local/bin/jmacs /usr/local/bin/jpico /usr/local/bin/jstar \
/usr/local/man/man1/joe.1 /usr/local/etc/joerc~
test -f /usr/local/etc/jmacsrc && mv -f /usr/local/etc/jmacsrc ~/backup/joe/
test -f /usr/local/etc/joerc && mv -f /usr/local/etc/joerc ~/backup/joe/
test -f /usr/local/etc/jpicorc && mv -f /usr/local/etc/jpicorc ~/backup/joe/
test -f /usr/local/etc/jstarrc && mv -f /usr/local/etc/jstarrc ~/backup/joe/
test -f /usr/local/etc/rjoerc && mv -f /usr/local/etc/rjoerc ~/backup/joe/
# Back up your existing config files. Make sure you do this (if you're
# upgrading), below we blow away the existing rc files to take advantage of
# new features. Any changes you made to them will be lost if you don't.
test -d /etc/joe &&
( mkdir -p -m 0700 ~/backup/joe
rm -f /etc/joe/joerc~
cp -a /etc/joe/* ~/backup/joe/ )
test -d ~/backup/joe/doc && rm -r ~/backup/joe/doc
# Remove the Slackware package, if there is one
# Remove old config files in /etc/joe
# Install the new version
test -x /sbin/removepkg && /sbin/removepkg joe
test -d /etc/joe && find /etc/joe -type f -exec rm {} \;
make install
## To see what's changed (if anything) with the rc files, and the settings
## that you may want to (re-)set, run something like this:
# diff -ur ~/backup/joe /etc/joe | less
# The one change I usually make in my /etc/joe/joerc file is to remove the
# leading space from the " -nobackups" line (line 71). That prevents joe
# from leaving filename~ backup files all over the place.