summaryrefslogtreecommitdiffstats
path: root/bootstrap-cpp.sh
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@gmail.com>2017-11-03 12:51:11 +0100
committerGitHub <noreply@github.com>2017-11-03 12:51:11 +0100
commit9a50736f6a42200e1ebcd50896e382e649d45b78 (patch)
treee28cc0c5d0b33bd78027bfc79caa2016fb03f7e1 /bootstrap-cpp.sh
parent0df471cf727460575258c9af3e42be4ddbb344f3 (diff)
Revert "Various minor fixes to bootstrap scripts"
Diffstat (limited to 'bootstrap-cpp.sh')
-rwxr-xr-xbootstrap-cpp.sh24
1 files changed, 5 insertions, 19 deletions
diff --git a/bootstrap-cpp.sh b/bootstrap-cpp.sh
index 47d2a82622a..0b1d5751e96 100755
--- a/bootstrap-cpp.sh
+++ b/bootstrap-cpp.sh
@@ -5,10 +5,9 @@ usage() {
echo "Usage: $0 <source-dir> <build-dir>" >&2
}
-# Parse arguments
if [ $# -eq 2 ]; then
- SOURCE_DIR="$1"
- BUILD_DIR="$2"
+ SOURCE_DIR=$(realpath $1)
+ BUILD_DIR=$(realpath $2)
elif [[ $# -eq 1 && ( "$1" = "-h" || "$1" = "--help" )]]; then
usage
exit 0
@@ -18,23 +17,10 @@ else
exit 1
fi
-# Check the source directory
-if [ ! -d "$SOURCE_DIR" ] ; then
- echo "Source dir $SOURCE_DIR not found" >&2
- exit 1
-fi
-SOURCE_DIR=$(realpath "${SOURCE_DIR}")
-
-# Check (and possibly create) the build directory
-mkdir -p "${BUILD_DIR}" || {
- echo "Failed to create build directory" >&2
- exit 1
-}
-BUILD_DIR=$(realpath "${BUILD_DIR}")
+mkdir -p "${BUILD_DIR}"
-# Build it
source /opt/rh/devtoolset-6/enable || true
cd "${SOURCE_DIR}"
-bash ./bootstrap.sh full
+sh ./bootstrap.sh full
cd "${BUILD_DIR}"
-bash ${SOURCE_DIR}/bootstrap-cmake.sh "${SOURCE_DIR}"
+sh ${SOURCE_DIR}/bootstrap-cmake.sh ${SOURCE_DIR}