Skip to content

Commit 0e09d7e

Browse files
authored
Merge pull request #179 from nicolasbock/build_script
Simplify variable settings in script
2 parents e8caee4 + 76d92e1 commit 0e09d7e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

build.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/bin/bash
22

3-
TOP_DIR="${PWD}"
4-
BUILD_DIR="${BUILD_DIR:=${TOP_DIR}/build}"
5-
INSTALL_DIR="${INSTALL_DIR:=${TOP_DIR}/install}"
3+
TOP_DIR=$(readlink --canonicalize $(dirname $0))
4+
5+
: ${BUILD_DIR:=${TOP_DIR}/build}
6+
: ${INSTALL_DIR:=${TOP_DIR}/install}
7+
: ${VERBOSE_MAKEFILE:=no}
8+
69
LOG_FILE="${TOP_DIR}/build.log"
7-
VERBOSE_MAKEFILE="${VERBOSE_MAKEFILE:=no}"
810

911
help() {
1012
cat <<EOF

0 commit comments

Comments
 (0)