aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt/portconf
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2006-09-06 12:50:31 +0000
committerAlex Dupre <ale@FreeBSD.org>2006-09-06 12:50:31 +0000
commit66be1c780cb9e7e166fadb9586a8c06d73f13bc6 (patch)
tree1664155611c518b70fe91751f026b1727f9c8105 /ports-mgmt/portconf
parent552aa65fb17d71536d55d22cd557f1667a9fdf46 (diff)
downloadports-66be1c780cb9e7e166fadb9586a8c06d73f13bc6.tar.gz
ports-66be1c780cb9e7e166fadb9586a8c06d73f13bc6.zip
Add explicit support for comments and empty lines in ports.conf.
PR: ports/102914 Submitted by: Hans Lambermont <hans@lambermont.dyndns.org>
Notes
Notes: svn path=/head/; revision=172403
Diffstat (limited to 'ports-mgmt/portconf')
-rw-r--r--ports-mgmt/portconf/Makefile2
-rw-r--r--ports-mgmt/portconf/files/pkg-message.in2
-rw-r--r--ports-mgmt/portconf/files/portconf.sh.in5
3 files changed, 4 insertions, 5 deletions
diff --git a/ports-mgmt/portconf/Makefile b/ports-mgmt/portconf/Makefile
index 7fe720d2cff9..2ef7a2244422 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 3858fba21893..859391f9f049 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 7f71512b76d2..7ac900d3c823 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'