#!/bin/sh
config() {
  NEW="$1"
  OLD="`dirname $NEW`/`basename $NEW .new`"
  # If there's no config file by that name, mv it over:
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
    rm $NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}
# Might need this later
#config etc/X11/fvwm2/system.fvwm2rc.new
( cd usr/man/man1 ; rm -rf xpmroot.1.gz )
( cd usr/man/man1 ; ln -sf fvwm-root.1.gz xpmroot.1.gz )
( cd usr/man/man1 ; rm -rf fvwm2.1.gz )
( cd usr/man/man1 ; ln -sf fvwm.1.gz fvwm2.1.gz )
( cd usr/share/fvwm ; rm -rf FvwmScript-ConfirmCopyConfig )
( cd usr/share/fvwm ; ln -sf default-config/FvwmScript-ConfirmCopyConfig FvwmScript-ConfirmCopyConfig )
( cd usr/share/fvwm ; rm -rf FvwmScript-DateTime )
( cd usr/share/fvwm ; ln -sf default-config/FvwmScript-DateTime FvwmScript-DateTime )
( cd usr/share/fvwm ; rm -rf FvwmScript-ConfirmQuit )
( cd usr/share/fvwm ; ln -sf default-config/FvwmScript-ConfirmQuit FvwmScript-ConfirmQuit )
( cd usr/bin ; rm -rf xpmroot )
( cd usr/bin ; ln -sf fvwm-root xpmroot )
( cd usr/bin ; rm -rf fvwm2 )
( cd usr/bin ; ln -sf fvwm fvwm2 )
( cd usr/libexec/fvwm/2.6.8 ; rm -rf FvwmAudio )
( cd usr/libexec/fvwm/2.6.8 ; ln -sf FvwmEvent FvwmAudio )
