svn commit: r416131 - head/Keywords

Baptiste Daroussin bapt at FreeBSD.org
Sun May 29 22:53:23 UTC 2016


Author: bapt
Date: Sun May 29 22:53:22 2016
New Revision: 416131
URL: https://svnweb.freebsd.org/changeset/ports/416131

Log:
  Make @shell rootdir friendly to allow cross installation

Modified:
  head/Keywords/shell.ucl

Modified: head/Keywords/shell.ucl
==============================================================================
--- head/Keywords/shell.ucl	Sun May 29 22:46:50 2016	(r416130)
+++ head/Keywords/shell.ucl	Sun May 29 22:53:22 2016	(r416131)
@@ -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


More information about the svn-ports-all mailing list