diff options
author | Markus Reichelt <slackbuilds@mareichelt.de> | 2013-12-26 21:09:07 +0100 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-01-07 11:13:05 -0600 |
commit | 17af9762056ddc8ab2346337426b47d7ebec4ccc (patch) | |
tree | 2a5eac141524e4d46470be51c6afed9932153921 /system/mksh/doinst.sh | |
parent | 83879bf08c64f156f1e782281be90db17b4130b2 (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.sh | 12 |
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 |