summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 ${?}
}