aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh14
1 files changed, 8 insertions, 6 deletions
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