2 # basic build script example
5 OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
6 OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
9 echo OS_VERSION_ID: ${OS_VERSION_ID}
11 # do nothing but print the current slave hostname
13 export CCACHE_DIR=/tmp/ccache
14 if [[ -d ${CCACHE_DIR} ]];then
15 echo ${CCACHE_DIR} exists
18 echo ${CCACHE_DIR} does not exist. This must be a new slave.
21 echo "cat /etc/bootstrap.sha"
22 if [[ -f /etc/bootstrap.sha ]];then
23 cat /etc/bootstrap.sha
25 echo "Cannot find cat /etc/bootstrap.sha"
28 echo "cat /etc/bootstrap-functions.sha"
29 if [[ -f /etc/bootstrap-functions.sha ]];then
30 cat /etc/bootstrap-functions.sha
32 echo "Cannot find cat /etc/bootstrap-functions.sha"
35 echo "sha1sum of this script: ${0}"
40 echo "Building using \"make package\""
41 # ensure that we build from scratch
43 [[ "x${DRYRUN}" == "xTrue" ]] || cd Requirements && make UNATTENDED=yes install-dep && cd ..
44 [[ "x${DRYRUN}" == "xTrue" ]] || pwd
45 if [[ "${OS_ID}" == "centos" ]]; then
46 [[ "x${DRYRUN}" == "xTrue" ]] || /opt/rh/devtoolset-7/enable
47 [[ "x${DRYRUN}" == "xTrue" ]] || cmake3 . -DCMAKE_PROGRAM_PATH:PATH="/opt/rh/devtoolset-7/root/bin"
49 [[ "x${DRYRUN}" == "xTrue" ]] || cmake .
52 [[ "x${DRYRUN}" == "xTrue" ]] || make package
53 # This will build deb or rpm JVPP package based on OS. Built packages are located in build-root/packages/
55 echo "*******************************************************************"
56 echo "* JVPP BUILD SUCCESSFULLY COMPLETED"
57 echo "*******************************************************************"