ci: Updating Jenkins-CI and Travis-CI scripts
This commit makes use of has function from `util.sh` script, enables
dependency installation for Jenkins-CI, and unifies dependency
installation between Jenkins-CI and Travis-CI.
Change-Id: I5f4419ea48d4eb333e9d107115ef3df4123f76e5
Refs: #2805
diff --git a/.jenkins.d/util.sh b/.jenkins.d/util.sh
new file mode 100755
index 0000000..81c8931
--- /dev/null
+++ b/.jenkins.d/util.sh
@@ -0,0 +1,9 @@
+has() {
+ local p=$1
+ shift
+ local x
+ for x in "$@"; do
+ [[ "${x}" == "${p}" ]] && return 0
+ done
+ return 1
+}