#!/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...
}
config etc/src2pkg/src2pkg.conf.new
config etc/src2pkg/DONT_PURGE.locales.new

( cd usr/libexec/src2pkg/static ; rm -f cat )
( cd usr/libexec/src2pkg/static ; ln -sf busybox cat )
( cd usr/libexec/src2pkg/static ; rm -f cp )
( cd usr/libexec/src2pkg/static ; ln -sf busybox cp )
( cd usr/libexec/src2pkg/static ; rm -f cut )
( cd usr/libexec/src2pkg/static ; ln -sf busybox cut )
( cd usr/libexec/src2pkg/static ; rm -f egrep )
( cd usr/libexec/src2pkg/static ; ln -sf busybox egrep )
( cd usr/libexec/src2pkg/static ; rm -f grep )
( cd usr/libexec/src2pkg/static ; ln -sf busybox grep )
( cd usr/libexec/src2pkg/static ; rm -f mkdir )
( cd usr/libexec/src2pkg/static ; ln -sf busybox mkdir )
( cd usr/libexec/src2pkg/static ; rm -f rm )
( cd usr/libexec/src2pkg/static ; ln -sf busybox rm )
( cd usr/libexec/src2pkg/static ; rm -f sort )
( cd usr/libexec/src2pkg/static ; ln -sf busybox sort )
( cd usr/libexec/src2pkg/static ; rm -f uniq )
( cd usr/libexec/src2pkg/static ; ln -sf busybox uniq )
( cd usr/libexec/src2pkg/static ; rm -f ls )
( cd usr/libexec/src2pkg/static ; ln -sf busybox ls )



