mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-24 09:25:01 +00:00
20 lines
347 B
Plaintext
20 lines
347 B
Plaintext
|
#!/bin/sh
|
||
|
#
|
||
|
# $FreeBSD$
|
||
|
#
|
||
|
|
||
|
PSH="${PKG_PREFIX-/usr/local}/bin/psh"
|
||
|
SHELLS="${PKG_DESTDIR-}/etc/shells"
|
||
|
|
||
|
case $2 in
|
||
|
POST-INSTALL)
|
||
|
if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$PSH\$" "$SHELLS"; then
|
||
|
if [ `id -u` -eq 0 ]; then
|
||
|
echo "$PSH" >> "$SHELLS"
|
||
|
else
|
||
|
echo "Not root, please add $PSH to $SHELLS manually"
|
||
|
fi
|
||
|
fi
|
||
|
;;
|
||
|
esac
|