summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-01-21 12:45:20 (EST)
committer P. J. McDermott <pjm@nac.net>2012-01-21 12:45:20 (EST)
commited68826e86a0e6c228203157d30fbea37aca32c4 (patch)
tree5f84effb1dabed461d187b708a1c96e2b4433a5a
parent4082229065787e8a803748c886c8db35479ef2b3 (diff)
Fix syntax errors in function and mistakes in BRE.
-rw-r--r--lib/controlfields8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/controlfields b/lib/controlfields
index a1a3f7b..8222a92 100644
--- a/lib/controlfields
+++ b/lib/controlfields
@@ -89,8 +89,8 @@ oh_get_field()
_value=''
while read -r _line; do
if [ -z ${_value} ]; then
- _value=$(echo "${_line}" | sed -n
- "s/^${_field}:[[:space:]]*\([[:space:]]\)[[:space:]]*$/\\1/p")
+ _value=$(echo "${_line}" | sed -n \
+ "s/^${_field}:[[:space:]]*\([^[:space:]]*\)[[:space:]]*$/\\1/p")
else
if echo "${_line}" | grep '^ ' > /dev/null; then
_value="${_value}
@@ -117,6 +117,6 @@ ${_line}"
# 1 on invalid name
oh_validate_pkg_name()
{
- {echo "${1}" | grep -E '^[a-z0-9][a-z0-9.+-]+$'} && return 0
- return 1
+ echo "${1}" | grep -E '^[a-z0-9][a-z0-9.+-]+$'
+ return ${?}
}