aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-17 15:58:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-17 15:58:31 +0200
commit9e1847f1193b0862c01689622a1427b26e925216 (patch)
treeb218982dfffffb7fd7265d4ce876529b079d0e67
parent590ba56543bd8e10c05cd8bf9e9ff6ff1f72e03e (diff)
Minor improvements to build scripts
-rw-r--r--build-mingw.bat4
-rw-r--r--build-msvc.bat4
-rwxr-xr-xbuild.sh14
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 ^<level^> 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 ^<level^> 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 <dir> Alternative installation directory."
- diag " --sudo <prog> Optional sudo program to use."
+ diag " --sudo <prog> Optional sudo program to use (pass false to disable)."
diag " --repo <loc> Alternative package repository location."
diag " --trust <fp> Repository certificate fingerprint to trust."
diag " --timeout <sec> 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