From dae7f43613f4eb3b5672b9c3f99304aaa36cfcaa Mon Sep 17 00:00:00 2001 From: edwin Date: Sun, 23 Sep 2007 11:43:44 +0000 Subject: [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" Approved by: maintainer timeout --- ports-mgmt/portconf/files/portconf.sh.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ports-mgmt/portconf/files') 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 , # Alex Dupre @@ -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 -- cgit