From 9e1847f1193b0862c01689622a1427b26e925216 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 17 May 2018 15:58:31 +0200 Subject: Minor improvements to build scripts --- build-mingw.bat | 4 ++-- build-msvc.bat | 4 ++-- build.sh | 14 ++++++++------ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/build-mingw.bat b/build-mingw.bat index ff9d3de..1cdeb12 100644 --- a/build-mingw.bat +++ b/build-mingw.bat @@ -20,9 +20,9 @@ echo --verbose ^ Diagnostics verbosity level between 0 and 6. echo. echo By default the batch file will install into C:\build2. It also expects echo to find the base utilities in the bin\ subdirectory of the installation -echo directory (C:\build2\bin\ by default). +echo directory ^(C:\build2\bin\ by default^). echo. -echo The --trust option recognizes two special values: 'yes' (trust everything) +echo The --trust option recognizes two special values: 'yes' ^(trust everything^) echo and 'no' (trust nothing). echo. echo The --make option can be used to bootstrap using GNU make. The first diff --git a/build-msvc.bat b/build-msvc.bat index 48e55d8..ac8ee63 100644 --- a/build-msvc.bat +++ b/build-msvc.bat @@ -19,9 +19,9 @@ echo --verbose ^ Diagnostics verbosity level between 0 and 6. echo. echo By default the batch file will use cl.exe as the C++ compiler and install echo into C:\build2. It also expects to find the base utilities in the bin\ -echo subdirectory of the installation directory (C:\build2\bin\ by default). +echo subdirectory of the installation directory ^(C:\build2\bin\ by default^). echo. -echo The --trust option recognizes two special values: 'yes' (trust everything) +echo The --trust option recognizes two special values: 'yes' ^(trust everything^) echo and 'no' (trust nothing). echo. echo See the BOOTSTRAP-MSVC file for details. diff --git a/build.sh b/build.sh index bcb851d..b6f3994 100755 --- a/build.sh +++ b/build.sh @@ -32,7 +32,7 @@ run () diag "+ $@" "$@" if test "$?" -ne "0"; then - exit 1; + exit 1 fi } @@ -41,20 +41,19 @@ owd="$(pwd)" cxx= idir= sudo= -sudo_set= trust= timeout= make= verbose= while test $# -ne 0; do - case $1 in + case "$1" in -h|--help) diag diag "$usage" diag "Options:" diag " --install-dir Alternative installation directory." - diag " --sudo Optional sudo program to use." + diag " --sudo Optional sudo program to use (pass false to disable)." diag " --repo Alternative package repository location." diag " --trust Repository certificate fingerprint to trust." diag " --timeout Network operations timeout in seconds." @@ -98,7 +97,6 @@ while test $# -ne 0; do exit 1 fi sudo="$1" - sudo_set="y" shift ;; --repo) @@ -170,11 +168,15 @@ fi if test -z "$idir"; then idir="/usr/local" - if test -z "$sudo_set"; then + if test -z "$sudo"; then sudo="sudo" fi fi +if test "$sudo" = false; then + sudo= +fi + if test -f build/config.build; then diag "error: current directory already configured, start with clean source" exit 1 -- cgit v1.1