summaryrefslogtreecommitdiffstats
path: root/system/mksh/doinst.sh
diff options
context:
space:
mode:
author Markus Reichelt2013-12-26 21:09:07 +0100
committer Erik Hanson2014-01-07 18:13:05 +0100
commit17af9762056ddc8ab2346337426b47d7ebec4ccc (patch)
tree2a5eac141524e4d46470be51c6afed9932153921 /system/mksh/doinst.sh
parent83879bf08c64f156f1e782281be90db17b4130b2 (diff)
downloadslackbuilds-17af9762056ddc8ab2346337426b47d7ebec4ccc.tar.gz
system/mksh: Updated for version R48b.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/mksh/doinst.sh')
-rw-r--r--system/mksh/doinst.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/mksh/doinst.sh b/system/mksh/doinst.sh
index 83ded97792..ebbd502e4b 100644
--- a/system/mksh/doinst.sh
+++ b/system/mksh/doinst.sh
@@ -1,3 +1,15 @@
if ! grep -q '/bin/mksh' etc/shells ; then
echo "/bin/mksh" >> etc/shells
fi
+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/skel/.mkshrc.new