blob: 0b1d5751e960cec08e1734bad940e96e26939074 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/bash -e
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
usage() {
echo "Usage: $0 <source-dir> <build-dir>" >&2
}
if [ $# -eq 2 ]; then
SOURCE_DIR=$(realpath $1)
BUILD_DIR=$(realpath $2)
elif [[ $# -eq 1 && ( "$1" = "-h" || "$1" = "--help" )]]; then
usage
exit 0
else
echo "Wrong number of arguments: expected 2, was $#" >&2
usage
exit 1
fi
mkdir -p "${BUILD_DIR}"
source /opt/rh/devtoolset-6/enable || true
cd "${SOURCE_DIR}"
sh ./bootstrap.sh full
cd "${BUILD_DIR}"
sh ${SOURCE_DIR}/bootstrap-cmake.sh ${SOURCE_DIR}
|