mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-04 01:48:54 +00:00
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)
23 lines
432 B
Bash
23 lines
432 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PSH="${PKG_PREFIX-/usr/local}/bin/psh"
|
|
SHELLS="${PKG_DESTDIR-}/etc/shells"
|
|
|
|
case $2 in
|
|
DEINSTALL)
|
|
if grep -qs "^$PSH\$" "$SHELLS"; then
|
|
if [ `id -u` -eq 0 ]; then
|
|
TMPSHELLS=`mktemp -t shells`
|
|
grep -v "^$PSH\$" "$SHELLS" > "$TMPSHELLS"
|
|
cat "$TMPSHELLS" > "$SHELLS"
|
|
rm "$TMPSHELLS"
|
|
else
|
|
echo "Not root, please remove $PSH from $SHELLS manually"
|
|
fi
|
|
fi
|
|
;;
|
|
esac
|