freebsd-ports/shells/mksh/pkg-deinstall
Martin Wilke 1f5d8f463c Add mksh , a Korn shell with many additions.
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>
2006-07-22 10:55:20 +00:00

22 lines
437 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
MKSH="${PKG_PREFIX-/usr/local}/bin/mksh"
SHELLS="${PKG_DESTDIR-}/etc/shells"
case $2 in
DEINSTALL)
if grep -qs "^$MKSH\$" "$SHELLS"; then
if [ `id -u` -eq 0 ]; then
TMPSHELLS=`mktemp -t shells`
grep -v "^$MKSH\$" "$SHELLS" > "$TMPSHELLS"
cat "$TMPSHELLS" > "$SHELLS"
rm "$TMPSHELLS"
else
echo "Not root, please remove $MKSH from $SHELLS manually"
fi
fi
;;
esac