commit | 6e64ac9eb5167294c0b3de6418a919e0d0a7962e | [log] [tgz] |
---|---|---|
author | Alexander Afanasyev <aa@cs.fiu.edu> | Thu Jun 14 17:25:38 2018 -0400 |
committer | Alexander Afanasyev <aa@cs.fiu.edu> | Thu Jun 14 18:10:38 2018 -0400 |
tree | 11d359e2cafd4b638d6bdfd36dd00cf8c0c89e06 | |
parent | 3f90fda055f5e29920de59765f58c96b75e2354f [diff] [blame] |
Build environment Change-Id: I1625f5ccf69d3cb78033439c411df419b9916cb3
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} +}