summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/package.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/package.sh b/lib/package.sh
index 24a6d01..bf21399 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -182,14 +182,12 @@ ob_get_binary_packages()
"${pkg}"
EOF
)"
- if echo "${pkgs_clean}" | grep " ${pkg_clean} " \
- >/dev/null 2>&1; then
+ case "${pkgs_clean}" in *" ${pkg_clean} "*)
_ob_warn_msg 'duplicate_clean_binary_name' \
"${pkg_clean}"
continue
- else
- pkgs_clean="${pkgs_clean}${pkg_clean} "
- fi
+ esac
+ pkgs_clean="${pkgs_clean}${pkg_clean} "
pkgs="${pkgs} ${pkg}"
@@ -409,10 +407,13 @@ _ob_set_binary_parameter()
EOF
)"
- if ! echo " ${_OB_BINARY_PARAMETERS} " | grep " ${name} " \
- >/dev/null 2>&1; then
- _OB_BINARY_PARAMETERS="${_OB_BINARY_PARAMETERS} ${name}"
- fi
+ case " ${_OB_BINARY_PARAMETERS} " in
+ *" ${name} "*)
+ ;;
+ *)
+ _OB_BINARY_PARAMETERS="${_OB_BINARY_PARAMETERS} ${name}"
+ ;;
+ esac
eval "_OB_BINFIELD_${package}_${name}=\"\${value}\""