diff options
author | Martin McConnell <bancensorshipfriends@hotmail.com> | 2014-01-13 06:46:59 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-01-29 23:21:00 -0600 |
commit | 444729b3deef904dfec2a3862d48530b57675141 (patch) | |
tree | 412a232a6d5bbeb77ba6d7011d932d50ce5e695c /development/diakonos/doinst.sh | |
parent | 6209cf0706fd85537c8fe5528cea5ab54f2c635c (diff) | |
download | slackbuilds-444729b3deef904dfec2a3862d48530b57675141.tar.gz |
development/diakonos: Added (advanced console text editor).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/diakonos/doinst.sh')
-rw-r--r-- | development/diakonos/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/development/diakonos/doinst.sh b/development/diakonos/doinst.sh new file mode 100644 index 0000000000..9d207adff1 --- /dev/null +++ b/development/diakonos/doinst.sh @@ -0,0 +1,15 @@ +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/diakonos.conf.new + |