mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-18 19:49:40 +00:00
Add explicit support for comments and empty lines in ports.conf.
PR: ports/102914 Submitted by: Hans Lambermont <hans@lambermont.dyndns.org>
This commit is contained in:
parent
552aa65fb1
commit
66be1c780c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=172403
@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= portconf
|
||||
PORTVERSION= 1.1
|
||||
PORTVERSION= 1.2
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -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.
|
||||
|
||||
*********************************************************
|
||||
|
@ -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'
|
||||
|
@ -8,7 +8,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= portconf
|
||||
PORTVERSION= 1.1
|
||||
PORTVERSION= 1.2
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -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.
|
||||
|
||||
*********************************************************
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user