Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 May 2016 22:53:22 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r416131 - head/Keywords
Message-ID:  <201605292253.u4TMrMC2072622@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605292253.u4TMrMC2072622>