commit | 0b2897e694aa1ca91af9d7679a8200a20d72c812 | [log] [tgz] |
---|---|---|
author | Ashlesh Gawande <agawande@memphis.edu> | Wed Jun 20 14:40:47 2018 -0500 |
committer | Ashlesh Gawande <agawande@memphis.edu> | Mon Jul 30 10:50:31 2018 -0500 |
tree | 759d2f4e56a8a1674254dab4f1c3b9a0d5b25c55 |
PSync: initial commit refs: #4641 Change-Id: Iabed3ad7632544d97559e6798547b7972b416784
diff --git a/.jenkins.d/util.sh b/.jenkins.d/util.sh new file mode 100644 index 0000000..a89bc27 --- /dev/null +++ b/.jenkins.d/util.sh
@@ -0,0 +1,18 @@ +has() { + local saved_xtrace + [[ $- == *x* ]] && saved_xtrace=-x || saved_xtrace=+x + set +x + + local p=$1 + shift + local i ret=1 + for i in "$@"; do + if [[ "${i}" == "${p}" ]]; then + ret=0 + break + fi + done + + set ${saved_xtrace} + return ${ret} +}