mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -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="%@" ;;
|
||||||
*) file="%D/%@" ;;
|
*) file="%D/%@" ;;
|
||||||
esac
|
esac
|
||||||
cp /etc/shells /etc/shells.bak
|
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
|
||||||
(grep -v "^${file}$" /etc/shells.bak; echo ${file}) > /etc/shells
|
(grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak; echo ${file}) > ${PKG_ROOTDIR}/etc/shells
|
||||||
rm -f /etc/shells.bak
|
rm -f ${PKG_ROOTDIR}/etc/shells.bak
|
||||||
EOD
|
EOD
|
||||||
pre-deinstall: <<EOD
|
pre-deinstall: <<EOD
|
||||||
case "%@" in
|
case "%@" in
|
||||||
/*) file="%@" ;;
|
/*) file="%@" ;;
|
||||||
*) file="%D/%@" ;;
|
*) file="%D/%@" ;;
|
||||||
esac
|
esac
|
||||||
cp /etc/shells /etc/shells.bak
|
cp ${PKG_ROOTDIR}/etc/shells ${PKG_ROOTDIR}/etc/shells.bak
|
||||||
grep -v "^${file}$" /etc/shells.bak > /etc/shells
|
grep -v "^${file}$" ${PKG_ROOTDIR}/etc/shells.bak > ${PKG_ROOTDIR}/etc/shells
|
||||||
rm -f /etc/shells.bak
|
rm -f ${PKG_ROOTDIR}/etc/shells.bak
|
||||||
EOD
|
EOD
|
||||||
|
|
Loading…
Add table
Reference in a new issue