From 74473a500b7c3dc38aec7f6eb3146bd5287fa52c Mon Sep 17 00:00:00 2001 From: Yalei Wang Date: Fri, 27 Jul 2018 17:23:49 +0800 Subject: Refactor: enlarge the buf for parsing the lib path Also add some minor fix for rpm install error check Change-Id: Id190d1caea888c0c19c0d1162265175e5a4e2a58 Signed-off-by: Yalei Wang --- scripts/build.sh | 2 +- scripts/build_dpdk1802.sh | 6 +++--- scripts/build_dpdk1805.sh | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/build.sh b/scripts/build.sh index 6379ed1..d412956 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -107,7 +107,7 @@ fi #===========build DPDK================ if [ "$OS_ID" == "centos" ]; then - bash -x $DMM_DIR/scripts/build_dpdk1802.sh + bash -x $DMM_DIR/scripts/build_dpdk1802.sh || exit 1 else if [ ! -d /usr/include/dpdk ] || [ ! -d /usr/share/dpdk ] || [ ! -d /usr/lib/modules/4.4.0-31-generic/extra/dpdk ]; then diff --git a/scripts/build_dpdk1802.sh b/scripts/build_dpdk1802.sh index 6430aed..01379d6 100755 --- a/scripts/build_dpdk1802.sh +++ b/scripts/build_dpdk1802.sh @@ -1,3 +1,4 @@ +#!/bin/bash -x ######################################################################### # # Copyright (c) 2018 Huawei Technologies Co.,Ltd. @@ -13,7 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. ######################################################################### -#!/bin/bash -x echo "check whether dpdk installed" cur_directory=${PWD} @@ -72,8 +72,8 @@ fi echo "install the rpm" cd ../RPMS/x86_64/ -sudo rpm -ivh dpdk-18.02-1.x86_64.rpm -sudo rpm -ivh dpdk-devel-18.02-1.x86_64.rpm +sudo rpm -ivh dpdk-18.02-1.x86_64.rpm || exit 1 +sudo rpm -ivh dpdk-devel-18.02-1.x86_64.rpm || exit 1 mkdir -p /tmp/dpdk/drivers/ cp -f /usr/lib64/librte_mempool_ring.so /tmp/dpdk/drivers/ diff --git a/scripts/build_dpdk1805.sh b/scripts/build_dpdk1805.sh index 0a91a8f..805153b 100755 --- a/scripts/build_dpdk1805.sh +++ b/scripts/build_dpdk1805.sh @@ -1,3 +1,4 @@ +#!/bin/bash -x ######################################################################### # # Copyright (c) 2018 Huawei Technologies Co.,Ltd. @@ -13,7 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. ######################################################################### -#!/bin/bash -x echo "check whether dpdk installed" cur_directory=${PWD} @@ -73,8 +73,8 @@ fi echo "install the rpm" cd ../RPMS/x86_64/ -sudo rpm -ivh dpdk-18.05-1.x86_64.rpm -sudo rpm -ivh dpdk-devel-18.05-1.x86_64.rpm +sudo rpm -ivh dpdk-18.05-1.x86_64.rpm || exit 1 +sudo rpm -ivh dpdk-devel-18.05-1.x86_64.rpm || exit 1 mkdir -p /tmp/dpdk/drivers/ cp -f /usr/lib64/librte_mempool_ring.so /tmp/dpdk/drivers/ -- cgit 1.2.3-korg