aboutsummaryrefslogtreecommitdiff
path: root/system/mksh/doinst.sh
diff options
context:
space:
mode:
authorMarkus Reichelt <slackbuilds@mareichelt.de>2013-12-26 21:09:07 +0100
committerErik Hanson <erik@slackbuilds.org>2014-01-07 11:13:05 -0600
commit17af9762056ddc8ab2346337426b47d7ebec4ccc (patch)
tree2a5eac141524e4d46470be51c6afed9932153921 /system/mksh/doinst.sh
parent83879bf08c64f156f1e782281be90db17b4130b2 (diff)
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 83ded97792fb9..ebbd502e4b633 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