-
Notifications
You must be signed in to change notification settings - Fork 2
/
.environment
21 lines (17 loc) · 1.7 KB
/
.environment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
export SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export REPO_ROOT=$(realpath "${SCRIPT_DIR}")
export BUILD_DIR="${REPO_ROOT}/build"
export CMAKE_REQUIRED_VERSION=$(cat $REPO_ROOT/CMakeLists.txt | grep -E "^[[:blank:]]*cmake_minimum_required[[:blank:]]*\([[:blank:]]*VERSION" | tail -1 | sed 's/.*VERSION //g' | sed 's/ //g' | sed 's/"//g' | cut -d\) -f1)
export FIO_CDT_VERSION_MAJOR=$(cat $REPO_ROOT/CMakeLists.txt | grep -E "^[[:blank:]]*set[[:blank:]]*\([[:blank:]]*VERSION_MAJOR" | tail -1 | sed 's/.*VERSION_MAJOR //g' | sed 's/ //g' | sed 's/"//g' | cut -d\) -f1)
export FIO_CDT_VERSION_MINOR=$(cat $REPO_ROOT/CMakeLists.txt | grep -E "^[[:blank:]]*set[[:blank:]]*\([[:blank:]]*VERSION_MINOR" | tail -1 | sed 's/.*VERSION_MINOR //g' | sed 's/ //g' | sed 's/"//g' | cut -d\) -f1)
export FIO_CDT_VERSION_PATCH=$(cat $REPO_ROOT/CMakeLists.txt | grep -E "^[[:blank:]]*set[[:blank:]]*\([[:blank:]]*VERSION_PATCH" | tail -1 | sed 's/.*VERSION_PATCH //g' | sed 's/ //g' | sed 's/"//g' | cut -d\) -f1)
export FIO_CDT_VERSION_SUFFIX=$(cat $REPO_ROOT/CMakeLists.txt | grep -E "^[[:blank:]]*set[[:blank:]]*\([[:blank:]]*VERSION_SUFFIX" | tail -1 | sed 's/.*VERSION_SUFFIX //g' | sed 's/ //g' | sed 's/"//g' | cut -d\) -f1)
export FIO_CDT_VERSION="${FIO_CDT_VERSION_MAJOR}.${FIO_CDT_VERSION_MINOR}"
if [[ -z $FIO_CDT_VERSION_SUFFIX ]]; then
export FIO_CDT_VERSION_FULL="${FIO_CDT_VERSION_MAJOR}.${FIO_CDT_VERSION_MINOR}.${FIO_CDT_VERSION_PATCH}"
else
export FIO_CDT_CNTRX_VERSION_FULL="${FIO_CDT_VERSION_MAJOR}.${FIO_CDT_VERSION_MINOR}.${FIO_CDT_VERSION_PATCH}-${FIO_CDT_VERSION_SUFFIX}"
fi
export TEMP_DIR="${TEMP_DIR:-${HOME}/tmp}"
export FIO_CDT_APTS_DIR="${FIO_APTS_DIR:-${TEMP_DIR}/fio/apts}"
. ./.build_vars