text
stringlengths 0
834k
|
|---|
set CB_CUSTOM_SETTING_SCRIPT=
|
set ""CB_VERBOSE=false""
|
if .%1==.--verbose shift & set ""CB_VERBOSE=true""
|
set errorCode=0
|
if not defined TEMP set TEMP=%TMP%
|
where powershell >nul 2>nul
|
if %ERRORLEVEL% NEQ 0 echo %CB_LINEHEADER%Please install powershell. & goto END_WITH_ERROR
|
call :GET_TIMESTAMP CB_START_TIMESTAMP
|
if .%CB_VERBOSE% == .true echo %CB_LINEHEADER%Started %CB_START_TIMESTAMP%.
|
for %%I in (.) do set folderName=%%~nxI
|
set ""TITLE_NAME=CB ^| %folderName% - %CB_START_TIMESTAMP:~11%""
|
title %TITLE_NAME%
|
if not defined CB_PACKAGE_URL (set ""CB_PACKAGE_URL="")
|
if not defined CB_INSTALL_USER_COMMIT (set ""CB_INSTALL_USER_COMMIT=true"")
|
if not defined CB_USER (set ""CB_USER=%USERNAME%"")
|
if not defined CB_PACKAGE_PASSWORD (set ""CB_PACKAGE_PASSWORD="")
|
if not defined CB_DEVTOOLS_JAVA_PREFIX (set ""CB_DEVTOOLS_JAVA_PREFIX=*jdk-"")
|
if not defined CB_INSTALL_OVERWRITE (set ""CB_INSTALL_OVERWRITE=false"")
|
set CB_INSTALL_OVERWRITE_DIST=%CB_INSTALL_OVERWRITE%
|
set CB_WGET_CMD=wget.exe
|
set CB_UNZIP_CMD=unzip.exe
|
set ""CB_PROJECT_JAVA_VERSION_FILE=.java-version""
|
set ""CB_JAVA_VERSION_FILE=.cb-java-version""
|
set CB_PARAMETERS=
|
if exist %CB_JAVA_VERSION_FILE% del /f /q ""%CB_JAVA_VERSION_FILE%"" 2>nul
|
if not defined CB_HOME (echo %CB_LINE% & echo %CB_LINEHEADER%Missing CB_HOME environment variable, please install with the cb-install.bat. & echo %CB_LINE% & goto END_WITH_ERROR)
|
cd /D %CB_HOME% 2>nul
|
if %ERRORLEVEL% NEQ 0 (echo %CB_LINE% & echo %CB_LINEHEADER%Invalid CB_HOME environment variable, please install with the cb-install.bat. & echo %CB_LINE% & goto END_WITH_ERROR)
|
cd /D %CB_WORKING_PATH%
|
if defined CB_DEVTOOLS goto SET_DEVTOOLS_END
|
cd /D %CB_HOME%\..
|
set ""CB_DEVTOOLS=%CD%""
|
cd /D %CB_WORKING_PATH%
|
:SET_DEVTOOLS_END
|
set ""CB_TOOL_VERSION_DEFAULT=%CB_HOME%\conf\tool-version-default.properties""
|
set ""CB_TOOL_VERSION_INSTALLED=%CB_HOME%\conf\tool-version-installed.properties""
|
set ""CB_TOOL_VERSION_DEFAULT_URL=https://raw.githubusercontent.com/toolarium/common-build/master/conf/tool-version-default.properties""
|
set CB_SET_DEFAULT=false
|
set ""CB_CURRENT_PATH=%CB_HOME%\current""
|
if not exist %CB_CURRENT_PATH% (mkdir %CB_CURRENT_PATH% >nul 2>nul)
|
:: be sure findstr works
|
findstr 2>nul
|
if %ERRORLEVEL% EQU 9009 (SET ""PATH=%PATH%;%SystemRoot%\System32\"")
|
:: read version
|
call %CB_SCRIPT_PATH%include\read-version %CB_SCRIPT_PATH%\..\VERSION
|
set CB_VERSION=%version.number%
|
:: check connection
|
set ""CB_OFFLINE=""
|
ping 8.8.8.8 -n 1 -w 1000 >nul 2>nul
|
if errorlevel 1 set ""CB_OFFLINE=true""
|
:: parameters without hooks
|
if .%1==.-h goto HELP
|
if .%1==.--help goto HELP
|
if .%1==.-v goto VERSION
|
if .%1==.--version goto VERSION
|
if .%1==.-exp shift & goto PROJECT_EXPLORE
|
if .%1==.--explore shift & goto PROJECT_EXPLORE
|
if .%1==.--packages shift & goto PACKAGES
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
:: custom initialisation
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
if defined CB_CUSTOM_CONFIG if not "".%CB_CUSTOM_CONFIG%""==""."" goto CUSTOM_CONFIG_END
|
set ""CB_CONFIG_HOME=%USERPROFILE%\.common-build""
|
if exist ""%CB_CONFIG_HOME%\conf\.cb-custom-config"" set /p CB_CUSTOM_CONFIG=<""%CB_CONFIG_HOME%\conf\.cb-custom-config""
|
if "".%CB_CUSTOM_CONFIG%""==""."" echo %CB_LINEHEADER%Ignore empty custom config, see %CB_CONFIG_HOME%\conf\.cb-custom-config
|
if not "".%CB_CUSTOM_CONFIG%""==""."" call :CB_CUSTOM_CONFIG_CHECK
|
if %errorCode% NEQ 0 goto END_WITH_ERROR
|
:CUSTOM_CONFIG_END
|
if "".%CB_CUSTOM_SETTING%""==""."" goto CUSTOM_SETTINGS_INIT_END_CALL
|
if exist ""%CB_CUSTOM_SETTING%"" goto CUSTOM_SETTINGS_INIT_CALL
|
echo %CB_LINE%
|
echo %CB_LINEHEADER%Could not find custom script, see %%CB_CUSTOM_SETTING%%:
|
echo %CB_CUSTOM_SETTING%
|
echo %CB_LINE%
|
goto CUSTOM_SETTINGS_INIT_END_CALL
|
:CUSTOM_SETTINGS_INIT_CALL
|
set ""CB_CUSTOM_SETTING_SCRIPT=%CB_CUSTOM_SETTING%""
|
if exist ""%CB_CUSTOM_SETTING_SCRIPT%"" call ""%CB_CUSTOM_SETTING_SCRIPT%"" start %1 %2 %3 %4 %5 %6 %7 2>nul
|
:CUSTOM_SETTINGS_INIT_END_CALL
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
:CHECK_PARAMETER
|
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.