diff options
author | sharath <sharathkumarboyanapally@gmail.com> | 2018-08-23 21:14:33 +0530 |
---|---|---|
committer | sharath <sharathkumarboyanapally@gmail.com> | 2018-09-06 10:20:37 +0530 |
commit | b8ad58fc06cef1af61a6dad31e71d4c15626f5f6 (patch) | |
tree | b43dab9ce2db9cac9ef5ae3f60be3e78de219bf5 /scripts/build_rsocket.sh | |
parent | 5686565ee3b379c590a1a09a05c92db50d206add (diff) |
Fix: enhancing the build scripts
Change-Id: Ibc52debf304335e8a69b4d3d5c5f6478d654ab88
Signed-off-by: sharath <sharathkumarboyanapally@gmail.com>
Diffstat (limited to 'scripts/build_rsocket.sh')
-rwxr-xr-x | scripts/build_rsocket.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/scripts/build_rsocket.sh b/scripts/build_rsocket.sh new file mode 100755 index 0000000..ef31c88 --- /dev/null +++ b/scripts/build_rsocket.sh @@ -0,0 +1,34 @@ +#!/bin/bash -x + +set -x + +OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') + +DMM_DIR=`dirname $(readlink -f $0)`/../ +BUILD_DIR=${DMM_DIR}/build + +############### build rsocket +echo "rsocket build start" +cd $DMM_DIR/stacks/rsocket +if [ "$OS_ID" == "ubuntu" ]; then + wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64.tgz + tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64.tgz + cd MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64 +elif [ "$OS_ID" == "centos" ]; then + CENT_VERSION=`grep -oE '[0-9]+\.[0-9]+' /etc/redhat-release` + wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-rhel${CENT_VERSION}-x86_64.tgz + tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-rhel${CENT_VERSION}-x86_64.tgz + cd MLNX_OFED_LINUX-4.4-1.0.0.0-rhel${CENT_VERSION}-x86_64 +fi + +sudo ./mlnxofedinstall --force || exit 1 + +cd $BUILD_DIR +make dmm_rsocket +if [ $? -eq 0 ]; then + echo "rsocket build has SUCCESS" +else + echo "rsocket build has FAILED" + exit 1 +fi +echo "rsocket build finished"
\ No newline at end of file |