From ed68826e86a0e6c228203157d30fbea37aca32c4 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 21 Jan 2012 12:45:20 -0500 Subject: Fix syntax errors in function and mistakes in BRE. --- (limited to 'lib') 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 ${?} } -- cgit v0.9.1