mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 17:29:23 -04:00
Make @shell rootdir friendly to allow cross installation
This commit is contained in:
parent
07d30f486e
commit
97a6b58a85
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=416131
1 changed files with 6 additions and 6 deletions
|
@ -17,16 +17,16 @@ post-install: <<EOD
|
|||
/*) file="%@" ;;
|
||||
*) file="%D/%@" ;;
|
||||
esac
|
||||
cp /etc/shells /etc/shells.bak
|
||||
(grep -v "^${file}$" /etc/shells.bak; echo ${file}) > /etc/shells
|
||||
rm -f /etc/shells.bak
|
||||
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
|
||||
(grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak; echo ${file}) > ${PKG_ROOTDIR}/etc/shells
|
||||
rm -f ${PKG_ROOTDIR}/etc/shells.bak
|
||||
EOD
|
||||
pre-deinstall: <<EOD
|
||||
case "%@" in
|
||||
/*) file="%@" ;;
|
||||
*) file="%D/%@" ;;
|
||||
esac
|
||||
cp /etc/shells /etc/shells.bak
|
||||
grep -v "^${file}$" /etc/shells.bak > /etc/shells
|
||||
rm -f /etc/shells.bak
|
||||
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
|
||||
grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak > ${PKG_ROOTDIR}/etc/shells
|
||||
rm -f ${PKG_ROOTDIR}/etc/shells.bak
|
||||
EOD
|
||||
|
|
Loading…
Add table
Reference in a new issue