slackbuilds_ponce/system/mksh/doinst.sh
B. Watson dff3d16a86
system/mksh: New maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2023-01-07 08:13:46 +07:00

15 lines
301 B
Bash

if ! grep -q '/bin/mksh' etc/shells; then
echo "/bin/mksh" >> etc/shells
fi
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
rm $NEW
fi
}
config etc/skel/.mkshrc.new