summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-03 20:24:36 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-03 20:24:36 (EDT)
commit8d2135c8c372841b0a56c1781bc114e07c5fdec2 (patch)
treed7d00db7731c8daeadb458d00891b90c3c0217e3
parent8c34b29c98424d74703ef4ce0df5ac87f32c85d9 (diff)
Prevent duplicates in ${_OB_BINARY_PARAMETERS}.
-rw-r--r--lib/package.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/package.sh b/lib/package.sh
index bd73b83..6b71304 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -379,7 +379,10 @@ _ob_set_binary_parameter()
;;
esac
- _OB_BINARY_PARAMETERS="${_OB_BINARY_PARAMETERS} ${_obsbp_name}"
+ if ! echo " ${_OB_BINARY_PARAMETERS} " | grep " ${_obsbp_name} " \
+ >/dev/null 2>&1; then
+ _OB_BINARY_PARAMETERS="${_OB_BINARY_PARAMETERS} ${_obsbp_name}"
+ fi
# Escape the value.
_obsbp_value="$(echo "${_obsbp_value}" | sed "s/'/'\\\\''/g")"