cab771a7f9
use pkg-install and pkg-deinstall (both stoled from shells/bash) to do it. - Remove pre-install section, it's not more needed on this version, because Makefile is created correctly changing Makefile.PL PR: 80583 Submitted by: Renato Botelho (maintainer)
20 lines
347 B
Bash
20 lines
347 B
Bash
#!/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
|