rem snapshot archives.
:begin
- rem Display the help
- if /i "%~1" == "-?" goto syntax
- if /i "%~1" == "-h" goto syntax
- if /i "%~1" == "-help" goto syntax
-
rem Switch to this batch file's directory
cd /d "%~0\.." 1>NUL 2>&1
if /i "%~1" == "-clean" (
set MODE=CLEAN
+ ) else if /i "%~1" == "-?" (
+ goto syntax
+ ) else if /i "%~1" == "-h" (
+ goto syntax
+ ) else if /i "%~1" == "-help" (
+ goto syntax
) else (
goto unknown
)
setlocal
set VC_VER=
set BUILD_PLATFORM=
-
- rem Display the help
+
+ rem Ensure we have the required arguments
if /i "%~1" == "" goto syntax
- if /i "%~1" == "-?" goto syntax
- if /i "%~1" == "-h" goto syntax
- if /i "%~1" == "-help" goto syntax
:parseArgs
if "%~1" == "" goto prerequisites
set BUILD_CONFIG=debug
) else if /i "%~1%" == "release" (
set BUILD_CONFIG=release
+ ) else if /i "%~1" == "-?" (
+ goto syntax
+ ) else if /i "%~1" == "-h" (
+ goto syntax
+ ) else if /i "%~1" == "-help" (
+ goto syntax
) else (
if not defined START_DIR (
set START_DIR=%~1%
set VC_VER=
set BUILD_PLATFORM=
- rem Display the help
+ rem Ensure we have the required arguments
if /i "%~1" == "" goto syntax
- if /i "%~1" == "-?" goto syntax
- if /i "%~1" == "-h" goto syntax
- if /i "%~1" == "-help" goto syntax
:parseArgs
if "%~1" == "" goto prerequisites
set BUILD_CONFIG=debug
) else if /i "%~1" == "release" (
set BUILD_CONFIG=release
+ ) else if /i "%~1" == "-?" (
+ goto syntax
+ ) else if /i "%~1" == "-h" (
+ goto syntax
+ ) else if /i "%~1" == "-help" (
+ goto syntax
) else (
if not defined START_DIR (
set START_DIR=%~1
if not "%OS%" == "Windows_NT" goto nodos
setlocal
- rem Display the help
- if /i "%~1" == "-?" goto syntax
- if /i "%~1" == "-h" goto syntax
- if /i "%~1" == "-help" goto syntax
+:parseArgs
+ if /i "%~1" == "-?" (
+ goto syntax
+ ) else if /i "%~1" == "-h" (
+ goto syntax
+ ) else if /i "%~1" == "-help" (
+ goto syntax
+ )
:prerequisites
rem Check we have Perl installed
gzip --version <NUL 1>NUL 2>&1
if %ERRORLEVEL% equ 0 (set HAVE_GZIP=Y) else (set HAVE_GZIP=)
- rem Display the help
- if /i "%~1" == "-?" goto syntax
- if /i "%~1" == "-h" goto syntax
- if /i "%~1" == "-help" goto syntax
-
:parseArgs
if "%~1" == "" goto start
set VERSION=VC14
) else if /i "%~1" == "-clean" (
set MODE=CLEAN
+ ) else if /i "%~1" == "-?" (
+ goto syntax
+ ) else if /i "%~1" == "-h" (
+ goto syntax
+ ) else if /i "%~1" == "-help" (
+ goto syntax
) else (
goto unknown
)