mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-09 06:51:44 +00:00
1f5d8f463c
The MirOS Korn Shell, which contains many additions to the original Korn shell. WWW: http://mirbsd.de/mksh PR: ports/100713 Submitted by: Andreas Kohn <andreas at syndrom23.de>
20 lines
352 B
Bash
20 lines
352 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
MKSH="${PKG_PREFIX-/usr/local}/bin/mksh"
|
|
SHELLS="${PKG_DESTDIR-}/etc/shells"
|
|
|
|
case $2 in
|
|
POST-INSTALL)
|
|
if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$MKSH\$" "$SHELLS"; then
|
|
if [ `id -u` -eq 0 ]; then
|
|
echo "$MKSH" >> "$SHELLS"
|
|
else
|
|
echo "Not root, please add $MKSH to $SHELLS manually"
|
|
fi
|
|
fi
|
|
;;
|
|
esac
|