sbopkg/tools/doinst.sh
slakmagik 76e6c5ddb1 make README symlinks; modify build-related files
A cluster of changes related to creating symlinks in the
  /etc/{renames,repos}.d directories that point to the corresponding
  README in sbopkg's docdir and then generally updating most
  build-related files and getting it all documented.

  * 50-default: renamed to 50-default.renames

  * NEWS: note symlink docs and rename issues

  * README-renames: update to reflect new default filename and the fact
    that the files must end in '.renames'.

  * sbopkg.conf.5, sbopkg.8: update to reflect the new renames stuff
    (and the earlier repo file/dir-related changes I forgot to document
    there).

  * sbopkg: get_new_name(), get_old_name(): have grep only look through
    *.renames files and not, say, symlinks to READMEs.

  * doinst.sh: bring into alignment with the current SBo template.

  * tools/sbopkg.SlackBuild: make links from README-repos and
    README-renames to READMEs in the corresponding /etc/sbopkg/*.d
    directories.

  * tools/slack-desc: bring into alignment with the current SBo
    template.

  * tools/sspm: update address, add printe() and use it.
2011-03-10 04:17:52 +00:00

14 lines
381 B
Bash

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/sbopkg/sbopkg.conf.new