From 84cf2433571977ad129335960647557552d9d549 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 12 Mar 2019 22:36:49 -0400 Subject: _ob_validate_*(): Replace echo with here-document in grep commands --- (limited to 'lib') diff --git a/lib/metadata/proteanos.sh b/lib/metadata/proteanos.sh index d0168ab..514f8cb 100644 --- a/lib/metadata/proteanos.sh +++ b/lib/metadata/proteanos.sh @@ -31,8 +31,10 @@ _ob_validate_source_name() name="${1}" - if echo "${name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ - >/dev/null 2>&1; then + if grep -E "${_OB_NAME_RE_PROTEANOS}" >/dev/null 2>&1 <<-EOF + ${name} + EOF + then case "${name}" in src-*) return 1 @@ -51,8 +53,10 @@ _ob_validate_binary_name() name="${1}" - if echo "${name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ - >/dev/null 2>&1; then + if grep -E "${_OB_NAME_RE_PROTEANOS}" >/dev/null 2>&1 <<-EOF + ${name} + EOF + then case "${name}" in src-*) return 1 @@ -71,8 +75,9 @@ _ob_validate_version() version="${1}" - echo "${version}" | grep -E "${_OB_VERSION_RE_PROTEANOS}" \ - >/dev/null 2>&1 + grep -E "${_OB_VERSION_RE_PROTEANOS}" >/dev/null 2>&1 <<-EOF + ${version} + EOF return ${?} } -- cgit v0.9.1