diff options
author | aaditya <aaditya_gnulinux@zoho.com> | 2014-02-10 07:25:15 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-02-11 12:15:07 -0600 |
commit | f1739bc786336345c6f0680278d5b3a298f29215 (patch) | |
tree | f02e15a42cac0e33466ba2e00793e84706e3b51f /system/asbt/doinst.sh | |
parent | 2037ae7eee4d1f90e07b2e3dcbd0b9ec54aeb305 (diff) | |
download | slackbuilds-f1739bc786336345c6f0680278d5b3a298f29215.tar.gz |
system/asbt: Added (Managing SBo packages in local repository).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/asbt/doinst.sh')
-rw-r--r-- | system/asbt/doinst.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/system/asbt/doinst.sh b/system/asbt/doinst.sh new file mode 100644 index 0000000000..69b1d2d95c --- /dev/null +++ b/system/asbt/doinst.sh @@ -0,0 +1,16 @@ +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 + else + # Otherwise, we leave the .new copy for the admin to consider... + echo -e "New configuration file /etc/asbt/asbt.conf.new created.\nYou may need to merge changes." + fi +} + +config etc/asbt/asbt.conf.new |