aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build-mingw.bat24
-rw-r--r--build-msvc.bat24
2 files changed, 44 insertions, 4 deletions
diff --git a/build-mingw.bat b/build-mingw.bat
index 34a74c8..02e1e87 100644
--- a/build-mingw.bat
+++ b/build-mingw.bat
@@ -9,12 +9,16 @@ goto start
:usage
echo.
-echo Usage: %0 [/?] ^<cxx^> [^<install-dir^>]
+echo Usage: %0 [/?] ^<cxx^> [^<install-dir^>] [^<trust^>]
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.
+echo The ^<trust^> argument can be used to specify the repository certificate
+echo fingerprint to trust. Two special values are also recognized: 'yes'
+echo (trust everything) and 'no' (trust nothing).
+echo.
echo Example usage:
echo.
echo %0 C:\mingw\bin\g++ D:\build2
@@ -59,6 +63,22 @@ if "_%2_" == "__" (
set "idir=%2"
)
+rem Certificate to trust.
+rem
+if "_%3_" == "__" (
+ set "trust="
+) else (
+ if "_%3_" == "_yes_" (
+ set "trust=--trust-yes"
+ ) else (
+ if "_%3_" == "_no_" (
+ set "trust=--trust-no"
+ ) else (
+ set "trust=--trust %3"
+ )
+ )
+)
+
if not exist %idir%\bin\ (
echo error: %idir%\bin\ does not exist
goto error
@@ -153,7 +173,7 @@ bpkg-stage create^
bpkg-stage add %BUILD2_REPO%
@if errorlevel 1 goto error
-bpkg-stage fetch
+bpkg-stage fetch %trust%
@if errorlevel 1 goto error
bpkg-stage build --yes build2 bpkg
diff --git a/build-msvc.bat b/build-msvc.bat
index 3378ffc..1b5e897 100644
--- a/build-msvc.bat
+++ b/build-msvc.bat
@@ -9,12 +9,16 @@ goto start
:usage
echo.
-echo Usage: %0 [/?] [^<install-dir^>]
+echo Usage: %0 [/?] [^<install-dir^>] [^<trust^>]
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.
+echo The ^<trust^> argument can be used to specify the repository certificate
+echo fingerprint to trust. Two special values are also recognized: 'yes'
+echo (trust everything) and 'no' (trust nothing).
+echo.
echo Example usage:
echo.
echo %0 D:\build2
@@ -50,6 +54,22 @@ if "_%1_" == "__" (
set "idir=%1"
)
+rem Certificate to trust.
+rem
+if "_%2_" == "__" (
+ set "trust="
+) else (
+ if "_%2_" == "_yes_" (
+ set "trust=--trust-yes"
+ ) else (
+ if "_%2_" == "_no_" (
+ set "trust=--trust-no"
+ ) else (
+ set "trust=--trust %2"
+ )
+ )
+)
+
if not exist %idir%\bin\ (
echo error: %idir%\bin\ does not exist
goto error
@@ -143,7 +163,7 @@ bpkg-stage create^
bpkg-stage add %BUILD2_REPO%
@if errorlevel 1 goto error
-bpkg-stage fetch
+bpkg-stage fetch %trust%
@if errorlevel 1 goto error
bpkg-stage build --yes build2 bpkg