mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
42542fb076
fully chrooted DESTDIR, which does not need such any more. Sponsored by: Google Summer of Code 2007 Approved by: portmgr (pav)
20 lines
337 B
Bash
20 lines
337 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
MKSH="${PKG_PREFIX-/usr/local}/bin/mksh"
|
|
SHELLS="/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
|