verify.sh revision cd7e67d9
1#!/bin/bash
2#set -xe -o pipefail
3echo "======================================"
4echo executing $0
5echo
6# Check if we are running on Centos or Ubuntu
7if [ -f /etc/lsb-release ];then
8    cat /etc/lsb-release
9    echo "======================================"
10    echo "Ubuntu version: "
11    . /etc/lsb-release
12    sudo apt-get install rpm
13    echo "Ubuntu is not supported for now."
14    exit 0
15elif [ -f /etc/redhat-release ];then
16    echo "======================================"
17    echo "redhat release version: "
18    cat /etc/redhat-release
19    echo
20fi
21export BASE_DIR=$(dirname $0)/../..
22
23echo "======================================"
24echo "BASE_DIR: ${BASE_DIR}"
25echo
26if [ ! -d ${BASE_DIR}/build ]; then
27    echo "=================================="
28    echo "${BASE_DIR}/build doesn't exist"
29    echo
30    exit 0
31fi
32cd ${BASE_DIR}/build/
33if [ ! -e build.sh ]; then
34    echo "=================================="
35    echo "build.sh doesn't exist"
36    echo
37    exit 0
38fi
39echo ./build.sh
40./build.sh
41