aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/portconf
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2007-09-23 11:43:44 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2007-09-23 11:43:44 +0000
commitbb9f30dc24f6db7fd9f9453c2049a336abe3c2d2 (patch)
tree5e48655303fd52e11bb839f9fd1c8a485fc38d65 /ports-mgmt/portconf
parent9ec71c12ba618fcc3c9dde6ace0e4c66e6414f0f (diff)
downloadports-bb9f30dc24f6db7fd9f9453c2049a336abe3c2d2.tar.gz
ports-bb9f30dc24f6db7fd9f9453c2049a336abe3c2d2.zip
[PATCH] ports-mgmt/portconf: support multiple ports per line
This patch adds support to allow multiple ports on a single line. Instead of having to do: port1: WITH_COOL_FEATURE port2: WITH_COOL_FEATURE you can do this: port1 port2: WITH_COOL_FEATURE PR: ports/115733 Submitted by: "Sean C. Farley" <scf@freebsd.org> Approved by: maintainer timeout
Notes
Notes: svn path=/head/; revision=199978
Diffstat (limited to 'ports-mgmt/portconf')
-rw-r--r--ports-mgmt/portconf/files/portconf.sh.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/ports-mgmt/portconf/files/portconf.sh.in b/ports-mgmt/portconf/files/portconf.sh.in
index 7ac900d3c823..98b8252f5262 100644
--- a/ports-mgmt/portconf/files/portconf.sh.in
+++ b/ports-mgmt/portconf/files/portconf.sh.in
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/sh -f
#
# Copyright (c) 2006 Florent Thoumie <flz@FreeBSD.org>,
# Alex Dupre <ale@FreeBSD.org>
@@ -34,8 +34,9 @@ if [ ! -r "${_conf}" ]; then
fi
_pwd=`pwd`
sed '/^#/d;/^[[:space:]]*$/d' "${_conf}" | while read _line; do
- _port=${_line%%:*}
- if [ "${_pwd%%${_port}}" != "${_pwd}" ]; then
- echo ${_line#*:} | sed -E 's/([A-Z0-9_]+)(=([^|]+))?/\1=\3/g;s/ *\| */|/g;s/ /%/g'
- fi
+ for _port in ${_line%%:*}; do
+ if [ "${_pwd%%${_port}}" != "${_pwd}" ]; then
+ echo ${_line#*:} | sed -E 's/([A-Z0-9_]+)(=([^|]+))?/\1=\3/g;s/ *\| */|/g;s/ /%/g'
+ fi
+ done
done