doinst.sh 494 B

12345678910111213141516171819
  1. config() {
  2. NEW="$1"
  3. OLD="$(dirname $NEW)/$(basename $NEW .new)"
  4. # If there's no config file by that name, mv it over:
  5. if [ ! -r $OLD ]; then
  6. mv $NEW $OLD
  7. elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
  8. rm $NEW
  9. fi
  10. # Otherwise, we leave the .new copy for the admin to consider...
  11. }
  12. config etc/zgv.conf.new
  13. if [ -x usr/bin/install-info ]; then
  14. chroot . /usr/bin/install-info --info-dir=/usr/info /usr/info/zgv.gz 2> /dev/null
  15. fi