1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00
freebsd-ports/Keywords/shell.yaml
Baptiste Daroussin 2bacde9c3b Add an @shell keyword to handle adding and remove a shell path in /etc/shell
Bump port revision of all ports that were doing it wrong prior to the keyword

CR:		D208
Reviewed by:	antoine
With hat:	portmgr
2014-06-11 17:42:36 +00:00

23 lines
782 B
YAML

# $FreeBSD$
#
# MAINTAINER: portmgr@FreeBSD.org
#
# @shell bin/shell
#
# Handle adding and remove a path to a shell binary into /etc/shells
# it replaces the following code:
#
# bin/shell
# @exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
# @unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
actions: [file]
post-install: |
cp /etc/shells /etc/shells.bak
(grep -v %D/%@ /etc/shells.bak; echo %D/%@) > /etc/shells
rm -f /etc/shells.bak
pre-deinstall: |
cp /etc/shells /etc/shells.bak
grep -v %D/%@ /etc/shells.bak > /etc/shells
rm -f /etc/shells.bak