summaryrefslogtreecommitdiffstats
path: root/build/functions.sh
diff options
context:
space:
mode:
authorThomas F Herbert <therbert@redhat.com>2016-06-27 10:37:46 -0400
committerThomas F Herbert <therbert@redhat.com>2016-06-29 13:40:42 -0400
commit1fe93bf666765927d9ed15ead14db85caf51098c (patch)
tree7d38e1a8d3316a09e8cf9742940fb9b54bd56af5 /build/functions.sh
parent36014367fcc0cd5cd1942cb077c6f52244a3164a (diff)
RPM: Apex: Refactor build scripts:
Remove reference to undercloud. Fix dependencies list. Refactor build ovs and build dpdk and test scripts. Correct default dpdk version in build ovs script. Remove references to instack VM -- no longer necessary. Remove script using custom Apex-lite-liberty for testing Consolidated functions and cleanup in response to reviewers. Change-Id: I0875acd87580769c7cd7e87b97bb3e04f0159b32 Signed-off-by: Thomas F Herbert <therbert@redhat.com>
Diffstat (limited to 'build/functions.sh')
-rwxr-xr-xbuild/functions.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/build/functions.sh b/build/functions.sh
new file mode 100755
index 0000000..76a0683
--- /dev/null
+++ b/build/functions.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+# Copyright (c) 2016 Open Platform for NFV Project, Inc. and its contributors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+usage() {
+ echo $0 [-d] [-k]
+ echo -d -- Test with DPDK
+ echo -k -- Load linux kernel module
+}
+
+function delrpm() {
+ set +e
+ rpm -q $1
+ if [ $? -eq 0 ]; then
+ sudo rpm -e --allmatches $1
+ fi
+ set -e
+}
+function cleanrpms() {
+ delrpm openvswitch
+ delrpm dpdk-devel
+ delrpm dpdk-tools
+ delrpm dpdk-examples
+ delrpm dpdk
+}
+function uninstallrpms() {
+ cleanrpms
+}