commit | 8617a79a1e6f1d7a6d9d574cf65d7596d9635a73 | [log] [tgz] |
---|---|---|
author | Zhiyi Zhang <zhiyi@cs.ucla.edu> | Tue Jan 17 16:45:56 2017 -0800 |
committer | Zhiyi Zhang <zhiyi@cs.ucla.edu> | Thu Jan 19 11:02:54 2017 -0800 |
tree | d3c9e63fdee459cb69d4e33eee29ed742b285868 | |
parent | 0e948fcfc5441a872e642fd34905b79964ffc91a [diff] [blame] |
build+ci: Add project skeleton Change-Id: I0fc7c71b23a99899f70d683b45cc27967db15beb
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} +}