freebsd-ports/shells/perlsh/pkg-install
Cheng-Lung Sung cab771a7f9 - Change the way used to add/remove the shell on /etc/shells,
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)
2005-05-04 05:47:17 +00:00

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