diff options
author | Alex Dupre <ale@FreeBSD.org> | 2006-09-06 12:50:31 +0000 |
---|---|---|
committer | Alex Dupre <ale@FreeBSD.org> | 2006-09-06 12:50:31 +0000 |
commit | 66be1c780cb9e7e166fadb9586a8c06d73f13bc6 (patch) | |
tree | 1664155611c518b70fe91751f026b1727f9c8105 /ports-mgmt/portconf/files/portconf.sh.in | |
parent | - These mp3 files are used only when WITH_MUSIC is defined. (diff) |
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 '')
-rw-r--r-- | ports-mgmt/portconf/files/portconf.sh.in | 5 |
1 files changed, 1 insertions, 4 deletions
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' |