From 0dd7403d5f2c6fd224bb88420ddf3479418e77aa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 30 Mar 2017 09:23:58 +0200 Subject: Add support for 'yes'/'no' values for build.sh --trust option --- build.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index e512072..ae82637 100755 --- a/build.sh +++ b/build.sh @@ -61,6 +61,9 @@ while test $# -ne 0; do diag diag "$0 --install-dir /opt/build2 --sudo sudo g++" diag + diag "The --trust option recognizes two special values: 'yes' (trust" + diag "everything) and 'no' (trust nothing)." + diag diag "See the BOOTSTRAP-UNIX file for details." diag exit 0 @@ -210,10 +213,14 @@ config.install.root="$idir" \ config.install.sudo="$conf_sudo" run bpkg-stage add "$BUILD2_REPO" -if test -n "$trust"; then - run bpkg-stage --trust "$trust" fetch -else +if test -z "$trust"; then run bpkg-stage fetch +elif test "$trust" = "yes"; then + run bpkg-stage --trust-yes fetch +elif test "$trust" = "no"; then + run bpkg-stage --trust-no fetch +else + run bpkg-stage --trust "$trust" fetch fi run bpkg-stage build --yes build2 bpkg run bpkg-stage install build2 bpkg -- cgit v1.1