verify.sh revision e0f06ca5
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 "BUILD_DIR: ${BASE_DIR}/build"
26echo
27if [ ! -d ${BASE_DIR}/build ]; then
28    echo "=================================="
29    echo "${BASE_DIR}/build doesn't exist"
30    echo
31    exit 1
32fi
33cd ${BASE_DIR}/build/
34if [ ! -e build.sh ]; then
35    echo "=================================="
36    echo "build.sh doesn't exist"
37    echo
38    exit 1
39fi
40echo ./build.sh
41./build.sh
42