diff options
author | Roberto Metere <roberto@metere.it> | 2016-11-03 17:02:34 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-11-03 17:02:34 +0700 |
commit | ee7a59f5a664c9bacce38ffd53d9138301b1e55f (patch) | |
tree | 3538a9ab87b47a497f88be2682a9e7b1618f4cc4 /development/maude/doinst.sh | |
parent | 5f92c72165e17fef08b0a03233144b080a780445 (diff) |
development/maude: Added (high-performance reflective language).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/maude/doinst.sh')
-rw-r--r-- | development/maude/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/development/maude/doinst.sh b/development/maude/doinst.sh new file mode 100644 index 000000000000..e06f63f5e29b --- /dev/null +++ b/development/maude/doinst.sh @@ -0,0 +1,14 @@ +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/profile.d/maude.sh.new |