diff options
author | ale <ale@FreeBSD.org> | 2006-09-06 12:50:31 +0000 |
---|---|---|
committer | ale <ale@FreeBSD.org> | 2006-09-06 12:50:31 +0000 |
commit | 98ddcc57fb24323864cf02762780cc68f2d93f9e (patch) | |
tree | 51eb5644245c066e124b13f0fdd9855180353991 /ports-mgmt | |
parent | 60832f68df5f8361d923a7f431df4e5ae804edcb (diff) | |
download | FreeBSD-ports-98ddcc57fb24323864cf02762780cc68f2d93f9e.zip FreeBSD-ports-98ddcc57fb24323864cf02762780cc68f2d93f9e.tar.gz |
Add explicit support for comments and empty lines in ports.conf.
PR: ports/102914
Submitted by: Hans Lambermont <hans@lambermont.dyndns.org>
Diffstat (limited to 'ports-mgmt')
-rw-r--r-- | ports-mgmt/portconf/Makefile | 2 | ||||
-rw-r--r-- | ports-mgmt/portconf/files/pkg-message.in | 2 | ||||
-rw-r--r-- | ports-mgmt/portconf/files/portconf.sh.in | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/ports-mgmt/portconf/Makefile b/ports-mgmt/portconf/Makefile index 7fe720d..2ef7a22 100644 --- a/ports-mgmt/portconf/Makefile +++ b/ports-mgmt/portconf/Makefile @@ -8,7 +8,7 @@ # PORTNAME= portconf -PORTVERSION= 1.1 +PORTVERSION= 1.2 CATEGORIES= sysutils MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/portconf/files/pkg-message.in b/ports-mgmt/portconf/files/pkg-message.in index 3858fba..859391f 100644 --- a/ports-mgmt/portconf/files/pkg-message.in +++ b/ports-mgmt/portconf/files/pkg-message.in @@ -5,6 +5,7 @@ To set port-specific make variables, create the with the following syntax: --------------------------------------------------------- +# this is a comment editors/openoffice*: WITH_CCACHE|LOCALIZED_LANG=it www/firefox-i18n: WITHOUT_SWITCHER | FIREFOX_I18N=fr it x11/fakeport: CONFIGURE_ARGS=--with-modules="aaa bbb ccc" @@ -13,5 +14,6 @@ x11/fakeport: CONFIGURE_ARGS=--with-modules="aaa bbb ccc" Global port directory patterns and blanks around the pipe "|" symbol are allowed. Values shouldn't be quoted even if they contain spaces. +Lines beginning with a '#' are comments. ********************************************************* diff --git a/ports-mgmt/portconf/files/portconf.sh.in b/ports-mgmt/portconf/files/portconf.sh.in index 7f71512..7ac900d 100644 --- a/ports-mgmt/portconf/files/portconf.sh.in +++ b/ports-mgmt/portconf/files/portconf.sh.in @@ -33,10 +33,7 @@ if [ ! -r "${_conf}" ]; then exit fi _pwd=`pwd` -cat "${_conf}" | while read _line; do - if [ -z "${_line}" ]; then - continue - fi +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' |