diff options
author | edwin <edwin@FreeBSD.org> | 2007-09-23 19:43:44 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2007-09-23 19:43:44 +0800 |
commit | dae7f43613f4eb3b5672b9c3f99304aaa36cfcaa (patch) | |
tree | 051a36bd03be2802f18c48d3dc18b1074332a821 /ports-mgmt/portconf/files | |
parent | 0f90c031e4b3731616fb965b5a609a8558ffe9b8 (diff) | |
download | freebsd-ports-gnome-dae7f43613f4eb3b5672b9c3f99304aaa36cfcaa.tar.gz freebsd-ports-gnome-dae7f43613f4eb3b5672b9c3f99304aaa36cfcaa.tar.zst freebsd-ports-gnome-dae7f43613f4eb3b5672b9c3f99304aaa36cfcaa.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
Diffstat (limited to 'ports-mgmt/portconf/files')
-rw-r--r-- | ports-mgmt/portconf/files/portconf.sh.in | 11 |
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 |