Update cad/qelectrotech to version 0.5,1
[dports.git] / Keywords / shell.ucl
1 # $FreeBSD: head/Keywords/shell.ucl 417133 2016-06-19 22:21:22Z bapt $
2 #
3 # MAINTAINER: portmgr@FreeBSD.org
4 #
5 # @shell bin/shell
6 #
7 # Handle adding and remove a path to a shell binary into /etc/shells
8 #
9
10 actions: [file]
11 post-install: <<EOD
12   case "%@" in
13   /*) file="%@" ;;
14   *) file="%D/%@" ;;
15   esac
16         cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
17         (grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak; echo ${file}) > ${PKG_ROOTDIR}/etc/shells
18         rm -f ${PKG_ROOTDIR}/etc/shells.bak
19 EOD
20 pre-deinstall: <<EOD
21   case "%@" in
22   /*) file="%@" ;;
23   *) file="%D/%@" ;;
24   esac
25         cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
26         grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak > ${PKG_ROOTDIR}/etc/shells
27         rm -f ${PKG_ROOTDIR}/etc/shells.bak
28 EOD