diff options
author | 2018-08-23 21:14:33 +0530 | |
---|---|---|
committer | 2018-09-06 10:20:37 +0530 | |
commit | b8ad58fc06cef1af61a6dad31e71d4c15626f5f6 (patch) | |
tree | b43dab9ce2db9cac9ef5ae3f60be3e78de219bf5 /scripts/compile_dmm.sh | |
parent | 5686565ee3b379c590a1a09a05c92db50d206add (diff) |
Fix: enhancing the build scripts
Change-Id: Ibc52debf304335e8a69b4d3d5c5f6478d654ab88
Signed-off-by: sharath <sharathkumarboyanapally@gmail.com>
Diffstat (limited to 'scripts/compile_dmm.sh')
-rwxr-xr-x | scripts/compile_dmm.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/compile_dmm.sh b/scripts/compile_dmm.sh new file mode 100755 index 0000000..b4bc455 --- /dev/null +++ b/scripts/compile_dmm.sh @@ -0,0 +1,29 @@ +#!/bin/bash -x + +set -x + +BUILD_DIR=`dirname $(readlink -f $0)`/../build + +OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') + +echo "DMM build started....." + +cd $BUILD_DIR +rm -rf * +cmake .. +make -j 8 + +if [ $? -eq 0 ]; then + echo "DMM build is SUCCESS" +else + echo "DMM build has FAILED" + exit 1 +fi + +if [ "$OS_ID" == "centos" ]; then + make pkg-rpm +elif [ "$OS_ID" == "ubuntu" ]; then + make pkg-deb +fi + +echo "DMM build has FINISHED" |