doc_id
stringlengths
36
36
metadata
dict
input
stringlengths
28
4.3k
output
stringlengths
11
5.45k
54a8b7e6-c136-40c9-83f9-1f3ab1695fe7
{ "language": "Batchfile" }
```batchfile @ECHO OFF SET BASEDIR=%~dp0.. SET USERINI=%BASEDIR%\user.ini FOR /F "tokens=1,2 delims=:" %%a in ("%STEELTOE_PCF_CREDENTIALS%") do ( set CF_USER=%%a set CF_PASS=%%b ) SET PYTHON_HOME=C:\Python36 SET DOTNET_HOME=C:\Program Files\dotnet SET JAVA_HOME=C:\opt\oracle-jdk-8 SET GIT_HOME=C:\Program Files\Git SET MAVEN_HOME=C:\opt\apache-maven-3.3.9 SET TEST_OUT=C:\st\%~nx1 ECHO [behave.userdata] > %USERINI% ECHO cf_apiurl = api.run.pcfbeta.io >> %USERINI% ECHO cf_org = STEELTOE >> %USERINI% ECHO cf_username = %CF_USER% >> %USERINI% ECHO cf_password = %CF_PASS% >> %USERINI% ECHO output = %TEST_OUT% >> %USERINI% SET PATH=%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH% RMDIR /S /Q %TEST_OUT% CALL %BASEDIR%\test-setup CALL %BASEDIR%\test-run %* ``` Update path to CloundFoundry CLI
```batchfile @ECHO OFF SET BASEDIR=%~dp0.. SET USERINI=%BASEDIR%\user.ini FOR /F "tokens=1,2 delims=:" %%a in ("%STEELTOE_PCF_CREDENTIALS%") do ( set CF_USER=%%a set CF_PASS=%%b ) SET PYTHON_HOME=C:\Python36 SET DOTNET_HOME=C:\Program Files\dotnet SET JAVA_HOME=C:\opt\oracle-jdk-8 SET GIT_HOME=C:\Program Files\Git SET MAVEN_HOME=C:\opt\apache-maven-3.3.9 SET CF_HOME=C:\ProgramData\chocolatey\bin SET TEST_OUT=C:\st\%~nx1 ECHO [behave.userdata] > %USERINI% ECHO cf_apiurl = api.run.pcfbeta.io >> %USERINI% ECHO cf_org = STEELTOE >> %USERINI% ECHO cf_username = %CF_USER% >> %USERINI% ECHO cf_password = %CF_PASS% >> %USERINI% ECHO output = %TEST_OUT% >> %USERINI% SET PATH=%PYTHON_HOME%\Scripts;%DOTNET_HOME%;%JAVA_HOME%\bin;%GIT_HOME%\bin;%MAVEN_HOME%\bin;%PATH%;%CF_HOME% RMDIR /S /Q %TEST_OUT% CALL %BASEDIR%\test-setup CALL %BASEDIR%\test-run %* ```
4a7cf0cd-4b70-4024-b124-c89b68ff22f0
{ "language": "Batchfile" }
```batchfile ``` Add a simple build script for Windows with Visual Studio
```batchfile @rem Build and test Mbed TLS with Visual Studio using msbuild. @rem Usage: windows_msbuild [RETARGET] @rem RETARGET: version of Visual Studio to emulate @rem https://docs.microsoft.com/en-us/cpp/build/how-to-modify-the-target-framework-and-platform-toolset @rem These parameters are hard-coded for now. set "arch=x64" & @rem "x86" or "x64" set "cfg=Release" & @rem "Debug" or "Release" set "vcvarsall=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" if not "%~1"=="" set "retarget=,PlatformToolset=%1" @rem If the %USERPROFILE%\Source directory exists, then running @rem vcvarsall.bat will silently change the directory to that directory. @rem Setting the VSCMD_START_DIR environment variable causes it to change @rem to that directory instead. set "VSCMD_START_DIR=%~dp0\..\visualc\VS2010" "%vcvarsall%" x64 && ^ msbuild /t:Rebuild /p:Configuration=%cfg%%retarget% /m mbedTLS.sln ```
e608bd96-e4df-40e1-882a-0b48514ad158
{ "language": "Batchfile" }
```batchfile call ..\..\src\locatevc.bat "C:\Qt\Qt5.12.2\5.12.2\msvc2017\bin\qmake.exe" ring_qt512.pro -spec win32-msvc "CONFIG+=qtquickcompiler" rem "C:\Qt\Qt5.12.2\Tools\QtCreator\bin\jom.exe" -f ../build-ring_qt512-Desktop_Qt_5_12_2_MSVC2017_32bit-Release/Makefile qmake_all "C:\Qt\Qt5.12.2\Tools\QtCreator\bin\jom.exe" copy release\ringqt.dll ..\..\bin``` Update RingQt - Update from Qt 5.12.2 to Qt 5.12.3
```batchfile call ..\..\src\locatevc.bat "C:\Qt\Qt5.12.3\5.12.3\msvc2017\bin\qmake.exe" ring_qt512.pro -spec win32-msvc "CONFIG+=qtquickcompiler" rem "C:\Qt\Qt5.12.3\Tools\QtCreator\bin\jom.exe" -f ../build-ring_qt512-Desktop_Qt_5_12_3_MSVC2017_32bit-Release/Makefile qmake_all "C:\Qt\Qt5.12.3\Tools\QtCreator\bin\jom.exe" copy release\ringqt.dll ..\..\bin```
66e54511-7397-49e9-a306-f9fe9b7d83b9
{ "language": "Batchfile" }
```batchfile ``` Add init db windows script file
```batchfile @ECHO OFF IF %1.==. GOTO No1 REM Remove trailing / set CONFIG=%1 REM set debug parameters REM set DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=y" @powershell -Command "java -cp "..\lib\*" org.jboss.aerogear.unifiedpush.DBMaintenance $%DEBUG_OPTS% -Daerobase.config.dir=%CONFIG%" GOTO End1 :No1 ECHO Missing Config file GOTO End1 :End1 @ECHO ON ```
378310d3-c3c0-4c17-8fb4-cbb356f8f2ba
{ "language": "Batchfile" }
```batchfile ::******************************************************************************************************* :: BuildBeta.bat - Gbtc :: :: Tennessee Valley Authority, 2009 :: No copyright is claimed pursuant to 17 USC 105. All Other Rights Reserved. :: :: This software is made freely available under the TVA Open Source Agreement (see below). :: :: Code Modification History: :: ----------------------------------------------------------------------------------------------------- :: 10/05/2009 - Pinal C. Patel :: Generated original version of source code. :: 10/20/2009 - Pinal C. Patel :: Modified to force a build and suppress archives from being published to public locations. :: ::******************************************************************************************************* @ECHO OFF C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe Synchrophasor.buildproj /p:ForceBuild=true;SkipPublicArchive=true /l:FileLogger,Microsoft.Build.Engine;logfile=Synchrophasor.output PAUSE``` Modify .Net framework version to 4.0
```batchfile ::******************************************************************************************************* :: BuildBeta.bat - Gbtc :: :: Tennessee Valley Authority, 2009 :: No copyright is claimed pursuant to 17 USC 105. All Other Rights Reserved. :: :: This software is made freely available under the TVA Open Source Agreement (see below). :: :: Code Modification History: :: ----------------------------------------------------------------------------------------------------- :: 10/05/2009 - Pinal C. Patel :: Generated original version of source code. :: 10/20/2009 - Pinal C. Patel :: Modified to force a build and suppress archives from being published to public locations. :: 09/21/2010 - Mihir Brahmbhatt :: Change Framework path from v3.5 to v4.0 :: ::******************************************************************************************************* @ECHO OFF C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe Synchrophasor.buildproj /p:ForceBuild=true;SkipPublicArchive=true;SkipHelpFiles=true;SkipSigning=true /l:FileLogger,Microsoft.Build.Engine;logfile=Synchrophasor.output PAUSE```
da20cf03-09c5-42ce-a92b-73afa2a7feb0
{ "language": "Batchfile" }
```batchfile @echo off setlocal enabledelayedexpansion cls echo ### ### echo # CorpBot - CorpNewt # echo ### ### echo. set "botFile=WatchDog.py" set "pyPath=python" for /f %%i in ('where python 2^>nul') do ( set "p=%%i" if /i NOT "!p:~0,5!"=="INFO:" ( set "pyPath=%%i" ) ) set "thisDir=%~dp0" goto start :start if /i "%update%" == "Yes" ( call :update ) "%pyPath%" "%botFile%" pause > nul``` Fix for spaces in path
```batchfile @echo off setlocal enabledelayedexpansion cls echo ### ### echo # CorpBot - CorpNewt # echo ### ### echo. set "botFile=WatchDog.py" set "pyPath=python" for /f "tokens=*" %%i in ('where python 2^>nul') do ( set "p=%%i" if /i NOT "!p:~0,5!"=="INFO:" ( set "pyPath=%%i" ) ) set "thisDir=%~dp0" goto start :start if /i "%update%" == "Yes" ( call :update ) "%pyPath%" "%botFile%" pause > nul```
8d8edb9c-97e3-4afa-8d14-d25e47f7f8ff
{ "language": "Batchfile" }
```batchfile @echo off pushd %1 set attempts=5 set counter=0 :retry set /a counter+=1 echo Attempt %counter% out of %attempts% if exist %1\node_modules\azure-cli\bin\azure ( cmd /c npm update https://github.com/amitapl/azure-sdk-tools-xplat/tarball/kudu_s21_5 ) else ( cmd /c npm install https://github.com/amitapl/azure-sdk-tools-xplat/tarball/kudu_s21_5 ) IF %ERRORLEVEL% NEQ 0 goto error goto end :error if %counter% GEQ %attempts% goto :lastError goto retry :lastError popd echo An error has occured during npm install. exit /b 1 :end popd echo Finished successfully. exit /b 0 ``` Remove long directory from azure-cli
```batchfile @echo off pushd %1 set attempts=5 set counter=0 :retry set /a counter+=1 echo Attempt %counter% out of %attempts% if exist node_modules\azure-cli\bin\azure ( cmd /c npm update https://github.com/amitapl/azure-sdk-tools-xplat/tarball/kudu_s21_5 ) else ( cmd /c npm install https://github.com/amitapl/azure-sdk-tools-xplat/tarball/kudu_s21_5 ) IF %ERRORLEVEL% NEQ 0 goto error set long_unrequired_directory=node_modules\azure-cli\node_modules\azure\node_modules\request\node_modules\form-data\node_modules\combined-stream\node_modules\delayed-stream\test if exist %long_unrequired_directory% ( rmdir /s /q %long_unrequired_directory% IF %ERRORLEVEL% NEQ 0 goto error ) goto end :error if %counter% GEQ %attempts% goto :lastError goto retry :lastError popd echo An error has occured during npm install. exit /b 1 :end popd echo Finished successfully. exit /b 0 ```
e6e2ea07-87f3-4d4d-8413-2b833b35d33c
{ "language": "Batchfile" }
```batchfile ECHO Get revision number from git echo // Pre build automatically generated header file> GitRevision.h REM We use SET/P to do an echo without newline set /p="#define GITREVISION " >> GitRevision.h REM Count number of commits (relies on Git being installed) git rev-list HEAD | find /v /c "" >> GitRevision.h ``` Make prebuild batch file more adaptable by trying to find Git.exe
```batchfile ECHO Get revision number from git echo // Automatically generated header file created by Prebuild.bat > GitRevision.h REM We use SET/P to do an echo without newline set /p="#define GITREVISION " >> GitRevision.h REM Count number of commits (relies on Git being installed) IF NOT EXIST "C:\Program Files (x86)\Git\bin\git.exe" goto next1 "C:\Program Files (x86)\Git\bin\git.exe" rev-list HEAD | find /v /c "" >> GitRevision.h goto end :next1 IF NOT EXIST "C:\Program Files (x86)\SmartGit\git\bin\git.exe" goto next2 "C:\Program Files (x86)\SmartGit\git\bin\git.exe" rev-list HEAD | find /v /c "" >> GitRevision.h goto end :next2 REM Just try running git and hope it's in the path git rev-list HEAD | find /v /c "" >> GitRevision.h :end ```
fbcb284f-c032-436c-b9d8-8d40d282b561
{ "language": "Batchfile" }
```batchfile python setup.py install rmdir %~dp0windows /s /q mkdir %~dp0windows python setup.py py2exe move dist\retriever.exe %~dp0windows rmdir build dist /s /q``` Allow Windows batch file to work when there are spaces in the path.
```batchfile python setup.py install rmdir %~dp0windows /s /q mkdir %~dp0windows python setup.py py2exe move dist\retriever.exe windows\ rmdir build dist /s /q ```
c7536642-3cac-4a17-bbe1-b0527b79deef
{ "language": "Batchfile" }
```batchfile @ECHO OFF REM --------------------------------------------------------------------------- REM Builds the file utility nuget packages. REM --------------------------------------------------------------------------- SETLOCAL SET BUILD_NUMBER=%1 IF "%BUILD_NUMBER%" == "" SET BUILD_NUMBER=5555 ECHO BUILD_NUMBER=%BUILD_NUMBER% SET /p VERSION=<ver.file-utility-code.txt ECHO Building targets for %VERSION%.%BUILD_NUMBER% SET PUBLISHCMD=dotnet publish -c Release /p:Version=%VERSION% ECHO PUBLISHCMD=%PUBLISHCMD% %PUBLISHCMD% .\CheckArisFile\ -o .\self-contained\CheckArisFile-win-x86\ --runtime win-x86 %PUBLISHCMD% .\CheckArisFile\ -o .\self-contained\CheckArisFile-linux-x64\ --runtime linux-x64 ENDLOCAL ``` Remove manual versioning from self-contained targets
```batchfile @ECHO OFF REM --------------------------------------------------------------------------- REM Builds the file utility nuget packages. REM --------------------------------------------------------------------------- SETLOCAL SET BUILD_NUMBER=%1 IF "%BUILD_NUMBER%" == "" SET BUILD_NUMBER=5555 ECHO BUILD_NUMBER=%BUILD_NUMBER% ECHO Building self-contained dotnet targets SET PUBLISHCMD=dotnet publish -c Release ECHO PUBLISHCMD=%PUBLISHCMD% %PUBLISHCMD% .\CheckArisFile\ -o .\self-contained\CheckArisFile-win-x86\ --runtime win-x86 %PUBLISHCMD% .\CheckArisFile\ -o .\self-contained\CheckArisFile-linux-x64\ --runtime linux-x64 ENDLOCAL ```
da182cd4-62f9-4ba7-9abb-0f1999b16bbd
{ "language": "Batchfile" }
```batchfile :: Apply patch to `subprocess` on Python versions > 2 and < 3.6.3 :: https://github.com/matplotlib/matplotlib/issues/9176 for /f "delims=" %%a in ('python -c "import subprocess; import os.path as op; print(op.abspath(op.join(op.dirname(subprocess.__file__), "".."")));"') do @set PATCH_PREFIX=%%a python -c "import sys; sys.exit(not (3,) < sys.version_info < (3,6,3))" && (curl -sL https://github.com/python/cpython/pull/1224.patch | patch -fsup 1 -d %PATCH_PREFIX% ) || ( set errorlevel= ) pytest -v -s -m indexed_gzip_test --niters 250 --pyargs indexed_gzip -k "not drop_handles" pytest -v -s -m indexed_gzip_test --niters 250 --concat --pyargs indexed_gzip -k "not drop_handles" ``` Make sure errorlevel is not empty
```batchfile :: Apply patch to `subprocess` on Python versions > 2 and < 3.6.3 :: https://github.com/matplotlib/matplotlib/issues/9176 for /f "delims=" %%a in ('python -c "import subprocess; import os.path as op; print(op.abspath(op.join(op.dirname(subprocess.__file__), "".."")));"') do @set PATCH_PREFIX=%%a python -c "import sys; sys.exit(not (3,) < sys.version_info < (3,6,3))" && (curl -sL https://github.com/python/cpython/pull/1224.patch | patch -fsup 1 -d %PATCH_PREFIX% ) || ( set errorlevel=0 ) pytest -v -s -m indexed_gzip_test --niters 250 --pyargs indexed_gzip -k "not drop_handles" pytest -v -s -m indexed_gzip_test --niters 250 --concat --pyargs indexed_gzip -k "not drop_handles" ```
4bfeefe5-f93a-45fb-a9f8-1f7190bf8d7d
{ "language": "Batchfile" }
```batchfile @rem Used by the buildbot "test" step. cd PCbuild call rt.bat -q -d -x64 -uall -rw ``` Use -W on the Windows 64 buildbots
```batchfile @rem Used by the buildbot "test" step. cd PCbuild call rt.bat -d -q -x64 -uall -rwW -n ```
57ac3d38-f428-4626-9bd4-193aa0da703b
{ "language": "Batchfile" }
```batchfile REM Run from anywhere, project root or bin folder. E.g. (from root): REM bin\kill-drivers tasklist | find /i "driver" && taskkill /f /im "chromedriver.exe" && taskkill /f /im "IEDriverServer.exe"``` Make sure all taskkills fire.
```batchfile @echo off REM Run from anywhere, project root or bin folder. E.g. (from root): REM bin\kill-drivers tasklist | findstr /i "driver phantomjs" taskkill /f /im "chromedriver.exe" taskkill /f /im "IEDriverServer.exe" taskkill /f /im "phantomjs.exe"```
b25c8483-3703-45aa-8670-9722ce01b391
{ "language": "Batchfile" }
```batchfile @echo off echo Building your theme... mkdir temp echo Building fonts... bin\makebundle.exe temp\8x8.fnt Template\font8x8 bin\makebundle.exe temp\7x6.fnt Template\font7x6 bin\makebundle.exe temp\4x6.fnt Template\font4x6 echo Copying colors... copy /y Template\colors.txt temp\colors.txt echo Copying graphics... copy /y Template\bevel.* temp copy /y Template\vu.* temp copy /y Template\analyzor.* temp copy /y Template\logo.* temp copy /y Template\cursor.* temp echo Bundling everything together... bin\makebundle.exe MyNewTheme temp echo --- echo Your new theme is now packed in the file called "MyNewTheme"! echo Copy the file in klystrack\res and restart klystrack. pause ``` Clean up after theme bundling
```batchfile @echo off echo Building your theme... mkdir temp echo Building fonts... bin\makebundle.exe temp\8x8.fnt Template\font8x8 bin\makebundle.exe temp\7x6.fnt Template\font7x6 bin\makebundle.exe temp\4x6.fnt Template\font4x6 echo Copying colors... copy /y Template\colors.txt temp\colors.txt echo Copying graphics... copy /y Template\bevel.* temp copy /y Template\vu.* temp copy /y Template\analyzor.* temp copy /y Template\logo.* temp copy /y Template\cursor.* temp echo Bundling everything together... bin\makebundle.exe MyNewTheme temp echo 'Cleaning up temporary files...' rmdir /S /q temp echo --- echo Your new theme is now packed in the file called "MyNewTheme"! echo Copy the file in klystrack\res and restart klystrack. pause ```
879e8d75-247d-4345-afb5-b84bbc72cd87
{ "language": "Batchfile" }
```batchfile @echo off if "%1" == "" ( echo Usage: buildrelease version-number goto end ) IF EXIST tmpdocs rmdir /s /q tmpdocs xcopy /q /s /i www\unstable\userguide tmpdocs xcopy /q /s /i www\_layouts tmpdocs\_layouts xcopy /q /s /i www\_plugins tmpdocs\_plugins xcopy /q /s /i www\css tmpdocs\css xcopy /q /s /i www\js tmpdocs\js xcopy /q /s /i www\fonts tmpdocs\fonts copy www\_config.yml tmpdocs echo ug_version: %1 >> tmpdocs\_config.yml REM Override the normal foundation layout copy tmpdocs\_layouts\foundation-offline.html tmpdocs\_layouts\foundation.html cd tmpdocs call jekyll build cd .. :end ``` Fix copy and paste typo
```batchfile @echo off if "%1" == "" ( echo Usage: buildofflineguide version-number goto end ) IF EXIST tmpdocs rmdir /s /q tmpdocs xcopy /q /s /i www\unstable\userguide tmpdocs xcopy /q /s /i www\_layouts tmpdocs\_layouts xcopy /q /s /i www\_plugins tmpdocs\_plugins xcopy /q /s /i www\css tmpdocs\css xcopy /q /s /i www\js tmpdocs\js xcopy /q /s /i www\fonts tmpdocs\fonts copy www\_config.yml tmpdocs echo ug_version: %1 >> tmpdocs\_config.yml REM Override the normal foundation layout copy tmpdocs\_layouts\foundation-offline.html tmpdocs\_layouts\foundation.html cd tmpdocs call jekyll build cd .. :end ```
9d1c5eb6-ca9b-498d-b666-3b9233695f60
{ "language": "Batchfile" }
```batchfile ``` Add script for automated local running
```batchfile docker run --rm --volume="%cd%:/srv/jekyll" -p 35729:35729 -p 4000:4000 --name jekyll -it jekyll/jekyll jekyll serve```
439244bb-ee11-49a4-9749-fc653f5b24c1
{ "language": "Batchfile" }
```batchfile .nuget\nuget.exe pack Baseclass.Contrib.Nuget.Output\Baseclass.Contrib.Nuget.Output.nuspec -Version 1.0.6 .nuget\nuget.exe pack Baseclass.Contrib.Nuget.Output\Baseclass.Contrib.Nuget.Output.Web.nuspec -Version 1.0.0 .nuget\nuget.exe pack Baseclass.Contrib.Nuget.Linked\Baseclass.Contrib.Nuget.Linked.nuspec -Version 1.0.2 .nuget\nuget.exe pack Baseclass.Contrib.Nuget.GitIgnoreContent\Baseclass.Contrib.Nuget.GitIgnoreContent.nuspec -Version 0.0.2``` Update Baseclass.Contrib.Nuget.Output version to 1.0.7
```batchfile .nuget\nuget.exe pack Baseclass.Contrib.Nuget.Output\Baseclass.Contrib.Nuget.Output.nuspec -Version 1.0.7 .nuget\nuget.exe pack Baseclass.Contrib.Nuget.Output\Baseclass.Contrib.Nuget.Output.Web.nuspec -Version 1.0.0 .nuget\nuget.exe pack Baseclass.Contrib.Nuget.Linked\Baseclass.Contrib.Nuget.Linked.nuspec -Version 1.0.2 .nuget\nuget.exe pack Baseclass.Contrib.Nuget.GitIgnoreContent\Baseclass.Contrib.Nuget.GitIgnoreContent.nuspec -Version 0.0.2```
d7555bfe-8610-4ab4-831f-48aa77d9bacd
{ "language": "Batchfile" }
```batchfile mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% .. if errorlevel 1 exit 1 cmake --build . --config Release --target install if errorlevel 1 exit 1 ``` Add a separate install phase
```batchfile mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% .. if errorlevel 1 exit 1 cmake --build . --config Release if errorlevel 1 exit 1 echo "Build finished" cmake --config Release --target install if errorlevel 1 exit 1 ```
a842fc2b-f907-4d6e-89ce-7a9bc9397cfc
{ "language": "Batchfile" }
```batchfile @ECHO OFF :: Run unit tests cd test\Steeltoe.Extensions.Configuration.CloudFoundry.Test dotnet test if not "%errorlevel%"=="0" goto failure cd ..\.. cd test\Steeltoe.Extensions.Configuration.ConfigServer.Test if not "%errorlevel%"=="0" goto failure dotnet test cd ..\.. echo Unit Tests Pass goto success :failure echo Unit Tests Failure exit -1 :success``` Fix test script for appveyor
```batchfile @ECHO OFF :: Run unit tests cd test\Steeltoe.Extensions.Configuration.CloudFoundry.Test dotnet test if not "%errorlevel%"=="0" goto failure cd ..\.. cd test\Steeltoe.Extensions.Configuration.ConfigServer.Test dotnet test if not "%errorlevel%"=="0" goto failure cd ..\.. echo Unit Tests Pass goto success :failure echo Unit Tests Failure exit -1 :success```
2d156a48-11ff-41a5-92fc-6df0e67f4b97
{ "language": "Batchfile" }
```batchfile SET EXE=%2 start %1%EXE% timeout /t %3 FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% taskkill /im %EXE% /f & exit /b 1 exit /b %errorlevel%``` Make Tests in Appveyor Exit when Test is finished
```batchfile SET EXE=%2 SET FINISHED=0 start %1%EXE% && %FINISHED%=1 FOR /L %%I in (1,1,%3) DO (timeout /t 1 && IF %%I EQU %3 goto :timeout && IF FINISHED EQU 1 goto :taskFinished) :taskFinished exit /b %errorlevel% :timeout FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq %EXE%"') DO IF %%x == %EXE% taskkill /im %EXE% /f & exit /b 1```
d1cf89c7-d693-4655-8be1-6414a431f8cb
{ "language": "Batchfile" }
```batchfile :: Paths assume java-jdk installed by conda set JCC_JDK=%JAVA_HOME% set PATH=%JCC_JDK%\jre\bin\server;%JCC_JDK%;%JCC_JDK%\jre\bin;%PATH% set JCC_INCLUDES=%JCC_JDK%\include\win32;%JCC_JDK%\include set JCC_LFLAGS=/DLL;/LIBPATH:%JCC_JDK%\lib;Ws2_32.lib;jvm.lib set JDK_HOME=%JCC_JDK% set ::cd jcc "%PYTHON%" setup.py install --single-version-externally-managed --record record.txt if errorlevel 1 exit 1 :: ensure that JCC_JDK is set correctly set ACTIVATE_DIR=%PREFIX%\etc\conda\activate.d set DEACTIVATE_DIR=%PREFIX%\etc\conda\deactivate.d mkdir %ACTIVATE_DIR% mkdir %DEACTIVATE_DIR% copy %RECIPE_DIR%\scripts\activate.bat %ACTIVATE_DIR%\jcc-activate.bat if errorlevel 1 exit 1 copy %RECIPE_DIR%\scripts\deactivate.bat %DEACTIVATE_DIR%\jcc-deactivate.bat if errorlevel 1 exit 1 ``` Remove windows explicitly stated compiler directives.
```batchfile :: Paths assume openjdk installed by conda set JCC_JDK=%JAVA_HOME% set PATH=%JCC_JDK%\jre\bin\server;%JCC_JDK%;%JCC_JDK%\jre\bin;%PATH% :: set JCC_INCLUDES=%JCC_JDK%\include\win32;%JCC_JDK%\include :: set JCC_LFLAGS=/DLL;/LIBPATH:%JCC_JDK%\lib;Ws2_32.lib;jvm.lib :: set JDK_HOME=%JCC_JDK% :: set "%PYTHON%" setup.py install --single-version-externally-managed --record record.txt if errorlevel 1 exit 1 :: ensure that JCC_JDK is set correctly set ACTIVATE_DIR=%PREFIX%\etc\conda\activate.d set DEACTIVATE_DIR=%PREFIX%\etc\conda\deactivate.d mkdir %ACTIVATE_DIR% mkdir %DEACTIVATE_DIR% copy %RECIPE_DIR%\scripts\activate.bat %ACTIVATE_DIR%\jcc-activate.bat if errorlevel 1 exit 1 copy %RECIPE_DIR%\scripts\deactivate.bat %DEACTIVATE_DIR%\jcc-deactivate.bat if errorlevel 1 exit 1 ```
108f9eb1-6ea7-4244-9a52-b6ea80bfb443
{ "language": "Batchfile" }
```batchfile cd /d %~dp0 java -jar pathvisio.jar -p visplugins.jar %* ``` Increase memory limit for standard installation
```batchfile cd /d %~dp0 java -Xmx1024m -jar pathvisio.jar -p visplugins.jar %* ```
b284ee4f-a54f-46cb-96a0-133adfbc3848
{ "language": "Batchfile" }
```batchfile @echo off cls ".nuget\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "packages" "-ExcludeVersion" "packages\FAKE\tools\Fake.exe" build.fsx``` Build : Added pause at the end of the bat file
```batchfile @echo off cls ".nuget\NuGet.exe" "Install" "FAKE" "-OutputDirectory" "packages" "-ExcludeVersion" "packages\FAKE\tools\Fake.exe" build.fsx pause```
e66bff66-1c66-4121-8375-565d70c8ad3f
{ "language": "Batchfile" }
```batchfile set PATH=%PATH:C:\Program Files\Git\usr\bin;=% :: Configure. cmake -G "MinGW Makefiles" -D CMAKE_INSTALL_PREFIX=%PREFIX% . if errorlevel 1 exit 1 :: Build. mingw32-make if errorlevel 1 exit 1 :: Install. mingw32-make install if errorlevel 1 exit 1 sixs < Example_In_1.txt ``` Change install prefix to LIBRARY_PREFIX
```batchfile set PATH=%PATH:C:\Program Files\Git\usr\bin;=% :: Configure. cmake -G "MinGW Makefiles" -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% . if errorlevel 1 exit 1 :: Build. mingw32-make if errorlevel 1 exit 1 :: Install. mingw32-make install if errorlevel 1 exit 1 sixs < Example_In_1.txt ```
fa9cc516-55fa-489e-8b9c-6ec176c38cd1
{ "language": "Batchfile" }
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.60" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ``` Patch for version 0.602 update
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.602" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ```
989b98ac-ce7c-41b9-8aa1-d0b045949075
{ "language": "Batchfile" }
```batchfile "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "%~dp0..\LightBlue.sln" /target:Clean,Build /p:Configuration=Release /maxcpucount powershell.exe %~dp0PackageNuget.ps1``` Fix build script for systems without VS2012
```batchfile "C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "%~dp0..\LightBlue.sln" /target:Clean,Build /p:Configuration=Release;VisualStudioVersion=12.0 /maxcpucount powershell.exe %~dp0PackageNuget.ps1```
803acd29-ea19-4d78-a7c3-4bd60ed3273e
{ "language": "Batchfile" }
```batchfile @REM @REM Copyright (c) 2006, Intel Corporation @REM All rights reserved. This program and the accompanying materials @REM are licensed and made available under the terms and conditions of the BSD License @REM which accompanies this distribution. The full text of the license may be found at @REM http://opensource.org/licenses/bsd-license.php @REM @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @REM @REM @if "%1"=="" (goto build) @REM @if "%1"=="clean" (goto clean) @REM @if "%1"=="cleanall" (goto cleanall) :build @echo on ant -f %WORKSPACE%/build.xml %1 %2 %3 @echo off @goto end :clean @echo on ant clean -f %WORKSPACE%/build.xml @echo off @goto end :cleanall @echo on ant cleanall -f %WORKSPACE%/build.xml @echo off @goto end :end``` Simplify the script. It now allows normal ant targets and flags to be passed straight through. For example
```batchfile @REM @REM Copyright (c) 2006, Intel Corporation @REM All rights reserved. This program and the accompanying materials @REM are licensed and made available under the terms and conditions of the BSD License @REM which accompanies this distribution. The full text of the license may be found at @REM http://opensource.org/licenses/bsd-license.php @REM @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @REM ant -f %WORKSPACE%/build.xml %* ```
7d626f1f-3d4f-4c1b-9bdb-65ba506bd189
{ "language": "Batchfile" }
```batchfile conda list -p "%PREFIX%" --canonical if errorlevel 1 exit 1 for /f "delims=" %%i in ('conda list -p "%PREFIX%" --canonical') do set condalist=%%i if errorlevel 1 exit 1 echo "%condalist%" if not "%condalist%"=="conda-build-test-build-string-1.0-1" exit 1 cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-1.json" if errorlevel 1 exit 1 cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-1.json" | grep '"build_number": 0' if errorlevel 1 exit 1 cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-1.json" | grep '"build": "abc"' if errorlevel 1 exit 1 ``` Use correct build string in metadata files
```batchfile conda list -p "%PREFIX%" --canonical if errorlevel 1 exit 1 for /f "delims=" %%i in ('conda list -p "%PREFIX%" --canonical') do set condalist=%%i if errorlevel 1 exit 1 echo "%condalist%" if not "%condalist%"=="conda-build-test-build-string-1.0-abc" exit 1 cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-abc.json" if errorlevel 1 exit 1 cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-abc.json" | grep '"build_number": 0' if errorlevel 1 exit 1 cat "%PREFIX%\conda-meta\conda-build-test-build-string-1.0-abc.json" | grep '"build": "abc"' if errorlevel 1 exit 1 ```
cbdddfea-5d7a-4c7e-bed2-1b368c419094
{ "language": "Batchfile" }
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.78" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ``` Patch for version 0.79 update
```batchfile @echo off cls :start echo Starting server... "Nomad Server\NomadServer.exe" -name "My Oxide Server" -port 5127 -slots 10 -clientVersion "0.79" -password "" -tcpLobby "149.202.51.185" 25565 echo. echo Restarting server... echo. goto start ```
1dec3ded-4d1a-415f-8555-7c81046ec739
{ "language": "Batchfile" }
```batchfile for %%F in ("." "bin") do ( cmake -G "%CMAKE_GENERATOR%" ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DCMAKE_INSTALL_DEBUG_LIBRARIES:BOOL="OFF" ^ -DCMAKE_INSTALL_DEBUG_LIBRARIES_ONLY:BOOL="OFF" ^ -DCMAKE_INSTALL_OPENMP_LIBRARIES:BOOL="ON" ^ -DCMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION:STRING=%%F ^ "%RECIPE_DIR%" if errorlevel 1 exit 1 cmake --build "%SRC_DIR%" ^ --target INSTALL ^ --config Release if errorlevel 1 exit 1 ) ``` Add WinSxS path to vcomp90
```batchfile if "%ARCH%" == "32" (set "ARCH_DIR=x86") if "%ARCH%" == "64" (set "ARCH_DIR=amd64") dir /a:d /o:-n /s /b C:\Windows\WinSxS\%ARCH_DIR%_microsoft.vc90.openmp* > vcomp90_locs.txt type vcomp90_locs.txt set /p VCOMP_DIR=<vcomp90_locs.txt echo "%VCOMP_DIR%" for %%F in ("." "bin") do ( cmake -G "%CMAKE_GENERATOR%" ^ -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS:PATH="%VCOMP_DIR%\vcomp90.dll" ^ -DCMAKE_INSTALL_DEBUG_LIBRARIES:BOOL="OFF" ^ -DCMAKE_INSTALL_DEBUG_LIBRARIES_ONLY:BOOL="OFF" ^ -DCMAKE_INSTALL_OPENMP_LIBRARIES:BOOL="ON" ^ -DCMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION:STRING=%%F ^ "%RECIPE_DIR%" if errorlevel 1 exit 1 cmake --build "%SRC_DIR%" ^ --target INSTALL ^ --config Release if errorlevel 1 exit 1 ) ```
c69bdd91-93d0-4f0d-99a9-96539d9efaf1
{ "language": "Batchfile" }
```batchfile ECHO OFF SET "ARCH=x64" SET "VC_ARCH=amd64" SET "QT_KIT=C:\Qt\5.12.0\msvc2017_64" SET "DIR=%~dp0" SET "BUILD_TYPE=release" SET "BUILD_DIR=%DIR%..\build-OAuthRedirectExample-Desktop_Qt_5_12_0_MSVC2017_64bit-Release\%BUILD_TYPE%" SET "ARCGIS_SDK_DIR=C:\Program Files (x86)\ArcGIS SDKs\Qt100.7\sdk\windows\%ARCH%\bin\%BUILD_TYPE%" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" %VC_ARCH% call %QT_KIT%\bin\windeployqt.exe %BUILD_DIR%\OAuthRedirectExample.exe --qmldir %DIR% -sensors -positioning copy "%ARCGIS_SDK_DIR%\EsriCommonQt.dll" "%BUILD_DIR%\EsriCommonQt.dll" copy "%ARCGIS_SDK_DIR%\runtimecore.dll" "%BUILD_DIR%\runtimecore.dll" ``` Update the version to 5.12.6.
```batchfile ECHO OFF SET "ARCH=x64" SET "VC_ARCH=amd64" SET "QT_KIT=C:\Qt\5.12.6\msvc2017_64" SET "DIR=%~dp0" SET "BUILD_TYPE=release" SET "BUILD_DIR=%DIR%..\build-OAuthRedirectExample-Desktop_Qt_5_12_6_MSVC2017_64bit-Release\%BUILD_TYPE%" SET "ARCGIS_SDK_DIR=C:\Program Files (x86)\ArcGIS SDKs\Qt100.7\sdk\windows\%ARCH%\bin\%BUILD_TYPE%" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" %VC_ARCH% call %QT_KIT%\bin\windeployqt.exe %BUILD_DIR%\OAuthRedirectExample.exe --qmldir %DIR% -sensors -positioning copy "%ARCGIS_SDK_DIR%\EsriCommonQt.dll" "%BUILD_DIR%\EsriCommonQt.dll" copy "%ARCGIS_SDK_DIR%\runtimecore.dll" "%BUILD_DIR%\runtimecore.dll" ```
89eb02e3-4e7c-48d7-aed4-3139ad4566a2
{ "language": "Batchfile" }
```batchfile setlocal call clean.bat call ..\Tools\SetVsEnv x86 inf2cat /uselocaltime /driver:. /os:XP_X86,Server2003_X86,XP_X64,Server2003_X64,Vista_X86,Server2008_X86,Vista_X64,Server2008_X64,7_X86,7_X64,Server2008R2_X64,8_X86,8_X64,Server8_X64,6_3_X86,6_3_X64,Server6_3_X64,10_X86,10_X64,Server10_X64 mkdir Install copy qemufwcfg.* .\Install\ endlocal ``` Remove code for legacy OSes
```batchfile setlocal call clean.bat call ..\Tools\SetVsEnv x86 inf2cat /uselocaltime /driver:. /os:8_X86,8_X64,Server8_X64,6_3_X86,6_3_X64,Server6_3_X64,10_X86,10_X64,Server10_X64 mkdir Install copy qemufwcfg.* .\Install\ endlocal ```
2e04d5c7-6ae5-4d2c-8dda-2d5c6f337dcc
{ "language": "Batchfile" }
```batchfile @echo #----------------------------------------------------------------------------# @echo # Generating main.lss @echo #----------------------------------------------------------------------------# avr-objdump -h -S bin\main.elf > bin\main.lss @echo #----------------------------------------------------------------------------# @echo # Generating main.hex @echo #----------------------------------------------------------------------------# avr-objcopy -O ihex bin\main.elf bin\main.hex @echo #----------------------------------------------------------------------------# @echo # File size main.hex @echo #----------------------------------------------------------------------------# avr-size --target=ihex bin\main.hex @echo #----------------------------------------------------------------------------# @echo # Burning main.hex in ATMega328p with COM7 @echo #----------------------------------------------------------------------------# c:\arduino\WinAVR-20100110\bin\avrdude.exe -v -pm2560 -cstk500v2 -PCOM4 -b115200 -e -U flash:w:"bin\main.hex" @echo # Done``` Update comport and avrdude path.
```batchfile @echo #----------------------------------------------------------------------------# @echo # Generating main.lss @echo #----------------------------------------------------------------------------# avr-objdump -h -S bin\main.elf > bin\main.lss @echo #----------------------------------------------------------------------------# @echo # Generating main.hex @echo #----------------------------------------------------------------------------# avr-objcopy -O ihex bin\main.elf bin\main.hex @echo #----------------------------------------------------------------------------# @echo # File size main.hex @echo #----------------------------------------------------------------------------# avr-size --target=ihex bin\main.hex @echo #----------------------------------------------------------------------------# @echo # Burning main.hex in ATMega328p with COM5 @echo #----------------------------------------------------------------------------# avrdude.exe -v -pm2560 -cstk500v2 -PCOM5 -b115200 -e -U flash:w:"bin\main.hex" @echo # Done```
7dc04571-1c88-471b-b126-50c1d09850cf
{ "language": "Batchfile" }
```batchfile @echo off :: http://stackoverflow.com/questions/12322308/batch-file-to-check-64bit-or-32bit-os reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set ARCH=x86 || set ARCH=x64 set NODE_PATH="%~dp0\bin\node\node-win32-%ARCH%.exe" @IF NOT EXIST %NODE_PATH% ( set NODE_PATH="node.exe" ) %NODE_PATH% "%~dp0\..\lib\resin.js" %* ``` Fix node Windows absolute path
```batchfile @echo off :: http://stackoverflow.com/questions/12322308/batch-file-to-check-64bit-or-32bit-os reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set ARCH=x86 || set ARCH=x64 set NODE_PATH="%~dp0\node\node-win32-%ARCH%.exe" @IF NOT EXIST %NODE_PATH% ( set NODE_PATH="node.exe" ) %NODE_PATH% "%~dp0\..\lib\resin.js" %* ```
29645a97-3062-4bd8-9439-3eaea0882380
{ "language": "Batchfile" }
```batchfile SET "JAVA_HOME=C:\opt\jdk1.8.0_161" cd git-repo ./mvnw clean install``` Add more logging for debugging formatting failures on windows
```batchfile SET "JAVA_HOME=C:\opt\jdk1.8.0_161" cd git-repo ./mvnw clean install -X```
ac9f00cd-ceb1-4268-a947-5f1f86eb23c6
{ "language": "Batchfile" }
```batchfile REM set version=31.0.0-pre1b REM set platform=x86 if "%platform%"=="x64" ( copy ..\x64\Release\CefSharp.Core.dll set DotPlatform=.x64 ) else ( copy ..\Win32\Release\CefSharp.Core.dll set Platform=x86 set DotPlatform= ) NuGet pack CefSharp.Common.nuspec -NoPackageAnalysis -Version %version% -Properties DotPlatform=%DotPlatform%;Platform=%Platform% NuGet pack CefSharp.WpfOrWinForms.nuspec -NoPackageAnalysis -Version %version% -Properties ControlType=Wpf;DotPlatform=%DotPlatform%;Platform=%Platform% NuGet pack CefSharp.WpfOrWinForms.nuspec -NoPackageAnalysis -Version %version% -Properties ControlType=WinForms;DotPlatform=%DotPlatform%;Platform=%Platform% ``` Make CI NuGets unique by %APPVEYOR_BUILD_NUMBER%
```batchfile set version=31.0.0-CI-%APPVEYOR_BUILD_NUMBER% REM set platform=x86 if "%platform%"=="x64" ( copy ..\x64\Release\CefSharp.Core.dll set DotPlatform=.x64 ) else ( copy ..\Win32\Release\CefSharp.Core.dll set Platform=x86 set DotPlatform= ) NuGet pack CefSharp.Common.nuspec -NoPackageAnalysis -Version %version% -Properties DotPlatform=%DotPlatform%;Platform=%Platform% NuGet pack CefSharp.WpfOrWinForms.nuspec -NoPackageAnalysis -Version %version% -Properties ControlType=Wpf;DotPlatform=%DotPlatform%;Platform=%Platform% NuGet pack CefSharp.WpfOrWinForms.nuspec -NoPackageAnalysis -Version %version% -Properties ControlType=WinForms;DotPlatform=%DotPlatform%;Platform=%Platform% ```
0b74d24c-e5f2-46f6-9a8e-f6ffca395055
{ "language": "Batchfile" }
```batchfile if not exist "C:\Windows\Temp\msys2.exe" ( powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/msys2/msys2-installer/releases/download/2020-07-20/msys2-x86_64-20200720.exe', 'C:\Windows\Temp\msys2.exe')" <NUL ) cmd /c "C:\Windows\Temp\msys2.exe -v --script A:\msys2-install.qs" ``` Kill background processes to allow parent to exit
```batchfile if not exist "C:\Windows\Temp\msys2.exe" ( powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/msys2/msys2-installer/releases/download/2020-07-20/msys2-x86_64-20200720.exe', 'C:\Windows\Temp\msys2.exe')" <NUL ) cmd /c "C:\Windows\Temp\msys2.exe -v --platform minimal --script A:\msys2-install.qs" taskkill /IM "gpg-agent.exe" /F taskkill /IM "dirmngr.exe" /F ```
66754051-c606-4955-9ee1-ac0dc4b41dce
{ "language": "Batchfile" }
```batchfile @echo off rem Check that the needed environment variables are set: if "%SPECWARE4%"=="" ( echo Error: environment variable SPECWARE4 not set. echo SPECWARE4 must be set to the path of the Specware 4 tree, echo e.g. c:\users\me\specware4. pause exit ) if "%XEMACS%"=="" ( echo Error: environment variable XEMACS not set. echo XEMACS must be set to the path of the XEmacs tree, echo e.g. c:\progra~1\xemacs\xemacs-21.4.11. pause exit ) if "%ALLEGRO%"=="" ( echo Error: environment variable ALLEGRO not set. echo ALLEGRO must be set to the path of the Allegro Common Lisp tree, echo e.g. c:\progra~1\acl62. pause exit ) rem Set additional environment variables that depend on the previous ones: if "%SWPATH%"=="" set SWPATH=C:/ rem set SWPATH only if unset set SPECWARE_BIN=%SPECWARE4%\Applications\Specware\bin\windows set LISP_EXECUTABLE=%ALLEGRO%\alisp.exe set LISP_HEAP_IMAGE=%SPECWARE_BIN%\Specware4.dxl set LISP_DIRECTORY=%Specware4%/ rem Move to Specware 4 main directory: cd "%SPECWARE4%" ``` Put double-quotes around filenames to avoid problems with environment variables expanding into directories containing spaces, periods, etc.
```batchfile @echo off rem Check that the needed environment variables are set: rem In general, enclose filenames in double-quotes, since enviroment rem variables could expand to dirctories containing spaces, periods, rem and other nasty characters. if "%SPECWARE4%"=="" ( echo Error: environment variable SPECWARE4 not set. echo SPECWARE4 must be set to the path of the Specware tree, echo e.g. C:\Specware4. pause exit ) if "%XEMACS%"=="" ( echo Error: environment variable XEMACS not set. echo XEMACS must be set to the path of the XEmacs tree, echo e.g. C:\Progra~1\xemacs\xemacs-21.4.18. pause exit ) if "%ALLEGRO%"=="" ( echo Error: environment variable ALLEGRO not set. echo ALLEGRO must be set to the path of the Allegro Common Lisp tree, echo e.g. C:\Progra~1\acl62. pause exit ) rem Set additional environment variables that depend on the previous ones: if "%SWPATH%"=="" set SWPATH="C:/" rem set SWPATH only if unset set SPECWARE_BIN="%SPECWARE4%\Applications\Specware\bin\windows" set LISP_EXECUTABLE="%ALLEGRO%\alisp.exe" set LISP_HEAP_IMAGE="%SPECWARE_BIN%\Specware4.dxl" set LISP_DIRECTORY="%Specware4%/" rem Move to Specware4 main directory: cd "%SPECWARE4%" ```
943d47a4-b262-4b06-b634-cf90115ec6a0
{ "language": "Batchfile" }
```batchfile @echo off rem check that JAVA_HOME and LCF_HOME are set rem save existing path here set OLDDIR=%CD% cd %LCF_HOME%\processes set CLASSPATH=. for %%f in (jar/*) do call script\setclasspath.bat %%f set JAVADEFINES= for %%g in (define/*) do call script\setdefine.bat %%g rem restore old path here cd %OLDDIR% "%JAVA_HOME%\bin\java" -Dorg.apache.lcf.configfile=%LCF_HOME%\properties.ini %JAVADEFINES% -classpath %CLASSPATH% %1 %2 %3 %4 %5 %6 %7 %8 %9 ``` Update script to check properly for missing variables, and get the quotations right (I hope)...
```batchfile @echo off rem check that JAVA_HOME and LCF_HOME are set if not exist "%JAVA_HOME%\bin\java.exe" goto nojavahome if not exist "%LCF_HOME%\properties.ini" goto nolcfhome rem save existing path here set OLDDIR=%CD% cd "%LCF_HOME%\processes" set CLASSPATH=. for %%f in (jar/*) do call script\setclasspath.bat %%f set JAVADEFINES= for %%g in (define/*) do call script\setdefine.bat %%g rem restore old path here cd "%OLDDIR%" "%JAVA_HOME%\bin\java" "-Dorg.apache.lcf.configfile=%LCF_HOME%\properties.ini" %JAVADEFINES% -classpath "%CLASSPATH%" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto done :nojavahome echo Environment variable JAVA_HOME is not set properly. goto done :nolcfhome echo Environment variable LCF_HOME is not set properly. goto done :done ```
8df947d3-1543-423f-ad93-d337a70afaec
{ "language": "Batchfile" }
```batchfile @echo off call "%vs140comntools%vsvars32.bat" set LIBDIR=C:\Magick.NET.libs set TARGET=C:\Magick.NET\ImageMagick if "%2"=="AnyCPU" goto anycpu xcopy %LIBDIR%\lib\Release\%2 %TARGET%\lib\Release\%2 /Y /S /I xcopy %LIBDIR%\%1\lib\Release\%2 %TARGET%\$1\lib\Release\%2 /Y /S /I goto build :anycpu xcopy %LIBDIR%\lib\Release %TARGET%\lib\Release /Y /S /I xcopy %LIBDIR%\%1\lib\Release %TARGET%\$1\lib\Release /Y /S /I :build powershell -ExecutionPolicy Unrestricted ..\Scripts\AppVeyor\Build.ps1 %1 %2``` Make sure only the used lib files end up in the Magick.NET.libs folder.
```batchfile @echo off call "%vs140comntools%vsvars32.bat" set LIBDIR=C:\Magick.NET.libs set TARGET=C:\Magick.NET\ImageMagick if "%2"=="AnyCPU" goto anycpu xcopy %LIBDIR%\lib\Release\%2 %TARGET%\lib\Release\%2 /Y /S /I xcopy %LIBDIR%\%1\lib\Release\%2 %TARGET%\%1\lib\Release\%2 /Y /S /I goto build :anycpu xcopy %LIBDIR%\lib\Release %TARGET%\lib\Release /Y /S /I xcopy %LIBDIR%\%1\lib\Release %TARGET%\%1\lib\Release /Y /S /I :build rmdir /S /Q %LIBDIR% xcopy %TARGET% %LIBDIR% /Y /S /I powershell -ExecutionPolicy Unrestricted ..\Scripts\AppVeyor\Build.ps1 %1 %2```
bbb06392-b42b-4a3d-a3e6-e9a0141612e1
{ "language": "Batchfile" }
```batchfile ``` Add command line for hector
```batchfile build\install\hector\bin\hector.bat com.marklogic.hector.JobConfig job input_file_path=./src/test/resources/Most_Popular_Baby_Names_NYC.csv delimited_root_name=baby-name document_type=xml output_collections=baby-name chunk_size=100 thread_count=4 ```
e2f1acb0-eba7-4cf9-b007-052b5121b77a
{ "language": "Batchfile" }
```batchfile ``` Add Windows batch file for batch conversion.
```batchfile @for %%a in (*.mid) do @midisplit "%%a" "%%~na-split.mid" rem @set midisplit_dir=%~dp0 rem rem :dispatch_loop rem @if "%1"=="" @goto dispatch_done rem @echo %midisplit_dir%midisplit "%1" "%~dpn1.mid" rem @shift rem @goto dispatch_loop rem :dispatch_done ```
eae98ea9-6103-43aa-91cc-cddc3f595a6e
{ "language": "Batchfile" }
```batchfile @echo off setlocal enabledelayedexpansion set PLAY_VERSION="2.2-SNAPSHOT" if defined JPDA_PORT set DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%JPDA_PORT%" set p=%~dp0 set p=%p:\=/% set fp=file:///!p: =%%20! java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% %JAVA_OPTS% -Dfile.encoding=UTF-8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="%fp%sbt/sbt.boot.properties" %PLAY_OPTS% -jar "%~dp0sbt\sbt-launch.jar" %* :end endlocal ``` Fix command history in Windows
```batchfile @echo off setlocal enabledelayedexpansion set PLAY_VERSION="2.2-SNAPSHOT" if defined JPDA_PORT set DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%JPDA_PORT%" set p=%~dp0 set p=%p:\=/% set fp=file:///!p: =%%20! java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% %JAVA_OPTS% -Dfile.encoding=UTF-8 -Dinput.encoding=Cp1252 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="%fp%sbt/sbt.boot.properties" %PLAY_OPTS% -jar "%~dp0sbt\sbt-launch.jar" %* :end endlocal ```
ad2c2d9e-2cb2-4957-be69-189f44c6b460
{ "language": "Batchfile" }
```batchfile echo off setlocal REM elevated window does not set current directory correctly. REM Workaround it by passing the current directory as 1st parameter pushd %1 certutil -addstore -f root RootCATest.cer certutil -f -p test -importpfx "WcfTestServer.pfx" netsh http add sslcert ipport=0.0.0.0:44285 certhash=1d85a3f6cd2c022c5ca54e5cb200a47f89ba0d3d appid={00000000-0000-0000-0000-000000000000} start powershell -ExecutionPolicy Bypass -File ..\test\Bridge\bin\ensureBridge.ps1 %2 %3 %4 %5 %6 %7 exit /b ``` Allow Bridge environment variables to configure Bridge use
```batchfile echo off setlocal REM elevated window does not set current directory correctly. REM Workaround it by passing the current directory as 1st parameter pushd %1 certutil -addstore -f root RootCATest.cer certutil -f -p test -importpfx "WcfTestServer.pfx" netsh http add sslcert ipport=0.0.0.0:44285 certhash=1d85a3f6cd2c022c5ca54e5cb200a47f89ba0d3d appid={00000000-0000-0000-0000-000000000000} if '%BridgeHost%' neq '' ( set _bridgeHostArg=-hostName %BridgeHost% ) if '%BridgePort%' neq '' ( set _bridgePortArg=-portNumber %BridgePort% ) if '%BridgeAllowRemote%' neq '' ( set _bridgeAllowRemoteArg=-allowRemote %BridgeAllowRemote% ) echo Executing: start powershell -ExecutionPolicy Bypass -File ..\test\Bridge\bin\ensureBridge.ps1 %_bridgeHostArg% %_bridgePortArg% %_bridgeAllowRemoteArg% start powershell -ExecutionPolicy Bypass -File ..\test\Bridge\bin\ensureBridge.ps1 %_bridgeHostArg% %_bridgePortArg% %_bridgeAllowRemoteArg% exit /b ```
c086fc3b-cbbb-4657-b543-7dddec882312
{ "language": "Batchfile" }
```batchfile @echo off :Build cls echo Restoring NuGet packages for solution... "tools\nuget\nuget.exe" "restore" "src/Cake.sln" echo. if not exist tools\Cake\Cake.exe ( echo Installing Cake... "tools\nuget\nuget.exe" "install" "Cake" "-OutputDirectory" "tools" "-ExcludeVersion" "-NonInteractive" echo. ) if not exist tools\xunit.runners\tools\xunit.console.exe ( echo Installing xUnit.net: Runners... "tools\nuget\nuget.exe" "install" "xunit.runners" "-OutputDirectory" "tools" "-ExcludeVersion" "-Version" "1.9.2" "-NonInteractive" echo. ) SET TARGET="All" IF NOT [%1]==[] (set TARGET="%1") SET BUILDMODE="Release" IF NOT [%2]==[] (set BUILDMODE="%2") echo Starting Cake... tools\Cake\Cake.exe build.cake -target=%TARGET% -configuration=%BUILDMODE% rem Loop the build script. echo. set CHOICE=nothing echo (R)ebuild or (Enter) to exit set /P CHOICE= if /i "%CHOICE%"=="R" goto :Build :Quit exit /b %errorlevel%``` Build script: Prevent NuGet from retrieving Cake from cache.
```batchfile @echo off :Build cls if not exist tools\Cake\Cake.exe ( echo Installing Cake... tools\nuget\nuget.exe install Cake -OutputDirectory tools -ExcludeVersion -NonInteractive -NoCache echo. ) if not exist tools\xunit.runners\tools\xunit.console.exe ( echo Installing xUnit.net: Runners... tools\nuget\nuget.exe install xunit.runners -OutputDirectory tools -ExcludeVersion -Version 1.9.2 -NonInteractive echo. ) SET TARGET="All" IF NOT [%1]==[] (set TARGET="%1") SET BUILDMODE="Release" IF NOT [%2]==[] (set BUILDMODE="%2") echo Starting Cake... tools\Cake\Cake.exe build.cake -target=%TARGET% -configuration=%BUILDMODE% -verbosity=verbose rem Loop the build script. echo. set CHOICE=nothing echo (R)ebuild or (Enter) to exit set /P CHOICE= if /i "%CHOICE%"=="R" goto :Build :Quit exit /b %errorlevel%```
0c2fb677-840b-4b63-904a-a9233e1d2adf
{ "language": "Batchfile" }
```batchfile rem ba.bat - download and build all of scintilla and scite rd /s/q scintilla scite cvs co scintilla scite cd scintilla call delbin del/q bin\*.a call delcvs call zipsrc cd win32 make cd .. cd .. cd scite del/q bin\*.properties del/q bin\SciTE call delbin call delcvs call zipsrc cd win32 make cd .. call upxsc1 call zipwscite call delbin cd .. cd scintilla call delbin cd .. ``` Change to using MSVC for builds.
```batchfile rem ba.bat - download and build all of scintilla and scite rd /s/q scintilla scite cvs co scintilla scite cd scintilla call delbin del/q bin\*.a call delcvs call zipsrc cd win32 nmake -f scintilla.mak cd .. cd .. cd scite del/q bin\*.properties del/q bin\SciTE call delbin call delcvs call zipsrc cd win32 nmake -f scite.mak cd .. call upxsc1 call zipwscite call delbin cd .. cd scintilla call delbin cd .. ```
7899726c-623d-4651-a82d-6daefaf04d8f
{ "language": "Batchfile" }
```batchfile @echo off setlocal if not defined EDITOR set EDITOR=notepad set PATH=%~dp0GIT_BIN_DIR\cmd;%PATH% "%~dp0GIT_BIN_DIR\GIT_PROGRAM" %* ``` Fix depot_tools\git.bat when depot_tools in not in PATH.
```batchfile @echo off setlocal if not defined EDITOR set EDITOR=notepad set PATH=%~dp0GIT_BIN_DIR\cmd;%~dp0;%PATH% "%~dp0GIT_BIN_DIR\GIT_PROGRAM" %* ```
77e9ebbc-36e0-4e9f-8edb-0a4fe737eb13
{ "language": "Batchfile" }
```batchfile @ECHO off IF NOT "x%1" == "x" GOTO :%1 :luvit ECHO "Building luvit" SET LUVI_APP=app SET LUVI_TARGET=luvit luvi-binaries\Windows\luvi.exe SET "LUVI_APP=" SET "LUVI_TARGET=" GOTO :end :test CALL Make.bat luvit luvit.exe tests\run.lua GOTO :end :clean IF EXIST luvit.exe DEL /F /Q luvit.exe :end ``` Include .exe in windows build
```batchfile @ECHO off IF NOT "x%1" == "x" GOTO :%1 :luvit ECHO "Building luvit" SET LUVI_APP=app SET LUVI_TARGET=luvit.exe luvi-binaries\Windows\luvi.exe SET "LUVI_APP=" SET "LUVI_TARGET=" GOTO :end :test CALL Make.bat luvit luvit.exe tests\run.lua GOTO :end :clean IF EXIST luvit.exe DEL /F /Q luvit.exe :end ```
6ddfd99d-049e-408d-b7e0-76a89b216053
{ "language": "Batchfile" }
```batchfile set MSBUILD_EXE=C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild cd 3rd-party\UnitTest++ %MSBUILD_EXE% UnitTest++.vsnet2008.sln /p:Configuration=Debug /target:Clean %MSBUILD_EXE% UnitTest++.vsnet2008.sln /p:Configuration=Release /target:Clean %MSBUILD_EXE% UnitTest++.vsnet2008.sln /p:Configuration=Debug %MSBUILD_EXE% UnitTest++.vsnet2008.sln /p:Configuration=Release cd ..\.. cmake CMakeLists.txt %MSBUILD_EXE% libamqp.sln /p:Configuration=Debug /target:Clean %MSBUILD_EXE% libamqp.sln /p:Configuration=Release /target:Clean %MSBUILD_EXE% libamqp.sln /p:Configuration=Debug ``` Update Windows CI build script.
```batchfile @echo off set DEVENV=C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild set DEVENV=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe if exist "%DEVENV%" goto devenv_found set DEVENV=C:\Program Files(x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe if exist "%DEVENV%" goto devenv_found echo "Please set DEVENV to the location of the devenv.exe program. got end :devenv_found echo "Building UnitTest++" cd 3rd-party\UnitTest++ "%DEVENV%" UnitTest++.vsnet2008.sln /Rebuild Debug "%DEVENV%" UnitTest++.vsnet2008.sln /Rebuild Release cd ..\.. echo "Running CMake" del CMakeCache.txt /q del CMakeFiles /s /q cmake CMakeLists.txt echo "Building Libamqp" "%DEVENV%" libamqp.sln /Rebuild Debug "%DEVENV%" libamqp.sln /Build Debug /project RUN_TESTS :end ```
24bd3f4a-e17a-4600-a075-6abeca267841
{ "language": "Batchfile" }
```batchfile @echo off rem ======================================================================== rem rem Copyright 2015-2016 Intel Corporation rem rem rem rem Licensed under the Apache License, Version 2.0 (the "License"); rem rem you may not use this file except in compliance with the License. rem rem You may obtain a copy of the License at rem rem rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem rem rem Unless required by applicable law or agreed to in writing, software rem rem distributed under the License is distributed on an "AS IS" BASIS, rem rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem rem See the License for the specific language governing permissions and rem rem limitations under the License. rem rem ======================================================================== rem setlocal md build cd build cmake -L ^ -G "%1" ^ -T "%2" ^ -D OSPRAY_BUILD_ISA=ALL ^ -D OSPRAY_BUILD_MIC_SUPPORT=OFF ^ -D OSPRAY_USE_EXTERNAL_EMBREE=ON ^ -D embree_DIR=..\..\embree\lib\cmake\embree-2.9.0 ^ -D USE_IMAGE_MAGICK=OFF ^ .. cmake --build . --config Release --target ALL_BUILD -- /m /nologo :abort endlocal :end ``` Handle spaces in args for batch file
```batchfile @echo off rem ======================================================================== rem rem Copyright 2015-2016 Intel Corporation rem rem rem rem Licensed under the Apache License, Version 2.0 (the "License"); rem rem you may not use this file except in compliance with the License. rem rem You may obtain a copy of the License at rem rem rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem rem rem Unless required by applicable law or agreed to in writing, software rem rem distributed under the License is distributed on an "AS IS" BASIS, rem rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem rem See the License for the specific language governing permissions and rem rem limitations under the License. rem rem ======================================================================== rem setlocal md build cd build cmake -L ^ -G "%~1" ^ -T "%~2" ^ -D OSPRAY_BUILD_ISA=ALL ^ -D OSPRAY_BUILD_MIC_SUPPORT=OFF ^ -D OSPRAY_USE_EXTERNAL_EMBREE=ON ^ -D embree_DIR=..\..\embree\lib\cmake\embree-2.9.0 ^ -D USE_IMAGE_MAGICK=OFF ^ .. cmake --build . --config Release --target ALL_BUILD -- /m /nologo :abort endlocal :end ```
a5554b09-87cb-4f69-a9ea-b1c529d7a16b
{ "language": "Batchfile" }
```batchfile ``` Add helper script to sign installer post build
```batchfile @echo off set /p path="Enter path to installer: " "C:\Program Files (x86)\Windows Kits\10\App Certification Kit\signtool.exe" sign /n "Open Source Developer, Michael Scrivo" /t http://timestamp.comodoca.com/authenticode /fd SHA256 %path% set /p throwaway=Hit ENTER to continue...```
fde378e9-8d9f-4310-aa03-f1dcd0b8fa4d
{ "language": "Batchfile" }
```batchfile ``` Add batch file that creates the directory structure required by the XMC4500 GCC port.
```batchfile REM This file should be executed from the command line prior to the first REM build. It will be necessary to refresh the Eclipse project once the REM .bat file has been executed (normally just press F5 to refresh). REM Copies all the required files from their location within the standard REM FreeRTOS directory structure to under the Eclipse project directory. REM This permits the Eclipse project to be used in 'managed' mode and without REM having to setup any linked resources. REM Standard paths SET FREERTOS_SOURCE=..\..\Source SET COMMON_SOURCE=..\Common\minimal SET COMMON_INCLUDE=..\Common\include REM Have the files already been copied? IF EXIST src\FreeRTOS_Source Goto END REM Create the required directory structure. MD src\FreeRTOS_Source MD src\FreeRTOS_Source\include MD src\FreeRTOS_Source\portable\GCC MD src\FreeRTOS_Source\portable\GCC\ARM_CM4F MD src\FreeRTOS_Source\portable\MemMang MD src\Common_Demo_Source MD src\Common_Demo_Source\include REM Copy the core kernel files into the SDK projects directory copy %FREERTOS_SOURCE%\tasks.c src\FreeRTOS_Source copy %FREERTOS_SOURCE%\queue.c src\FreeRTOS_Source copy %FREERTOS_SOURCE%\list.c src\FreeRTOS_Source copy %FREERTOS_SOURCE%\timers.c src\FreeRTOS_Source REM Copy the common header files into the SDK projects directory copy %FREERTOS_SOURCE%\include\*.* src\FreeRTOS_Source\include REM Copy the portable layer files into the projects directory copy %FREERTOS_SOURCE%\portable\GCC\ARM_CM4F\*.* src\FreeRTOS_Source\portable\GCC\ARM_CM4F REM Copy the basic memory allocation files into the SDK projects directory copy %FREERTOS_SOURCE%\portable\MemMang\heap_2.c src\FreeRTOS_Source\portable\MemMang REM Copy the files that define the common demo tasks. copy %COMMON_SOURCE%\dynamic.c src\Common_Demo_Source copy %COMMON_SOURCE%\BlockQ.c src\Common_Demo_Source copy %COMMON_SOURCE%\death.c src\Common_Demo_Source copy %COMMON_SOURCE%\blocktim.c src\Common_Demo_Source copy %COMMON_SOURCE%\semtest.c src\Common_Demo_Source copy %COMMON_SOURCE%\PollQ.c src\Common_Demo_Source copy %COMMON_SOURCE%\GenQTest.c src\Common_Demo_Source copy %COMMON_SOURCE%\recmutex.c src\Common_Demo_Source copy %COMMON_SOURCE%\sp_flop.c src\Common_Demo_Source copy %COMMON_SOURCE%\countsem.c src\Common_Demo_Source copy %COMMON_SOURCE%\integer.c src\Common_Demo_Source REM Copy the common demo file headers. copy %COMMON_INCLUDE%\*.h src\Common_Demo_Source\include : END ```
b52fff6e-de3b-45df-9609-7b207ef0b926
{ "language": "Batchfile" }
```batchfile ``` Enable .netmf in the gated build.
```batchfile @REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C# -- cd %build-root%\csharp\device\build call build_mf.cmd if errorlevel 1 goto :eof cd %build-root% ```
77ed200d-7470-404c-b8b9-d8b3173e58e4
{ "language": "Batchfile" }
```batchfile @ECHO OFF @REM ----- INIT SCREEN ----- TITLE Using command line to create new job !!! COLOR 0f CLS @REM ----- SET DEFAULT DIRECTORY ----- SET DIRNAME=%~dp0 IF "%DIRNAME%" == "" SET DIRNAME=.\ @REM ----- GET INFORMATION FOR JOB FROM CONSOLE ----- ECHO --------------- CREATE JOB: %2 --------------- ECHO. SET inputResult=%* IF "%1"=="-n" ( "%DIRNAME%\groovy.bat" "%DIRNAME%\genjob.groovy" %inputResult% ) ELSE ( ECHO "Incorrect format !!!" ECHO "Correct format of command: " ECHO "genjob -n <jobName> [-f <strFetchAction>] [-q <strQuery>] [-c <strCommand>] [-d <strDbExec>] [-fp <pathToFile>]" )``` Fix bug: directory contains space character
```batchfile @ECHO OFF setlocal @REM ----- INIT SCREEN ----- TITLE Using command line to create new job !!! COLOR 0f CLS @REM ----- SET WIPERDOG HOME DIRECTORY ----- set WIPERDOGHOME=%~dp0.. for %%i in ("%WIPERDOGHOME%") do set WIPERDOGHOME=%%~fsi cd "%WIPERDOGHOME%\bin" @REM ----- GET INFORMATION FOR JOB FROM CONSOLE ----- ECHO --------------- CREATE JOB: %2 --------------- ECHO. SET inputResult=%* IF "%1"=="-n" ( "%WIPERDOGHOME%\bin\groovy.bat" "%WIPERDOGHOME%\bin\genjob.groovy" %inputResult% ) ELSE ( ECHO "Incorrect format !!!" ECHO "Correct format of command: " ECHO "genjob -n <jobName> [-f <strFetchAction>] [-q <strQuery>] [-c <strCommand>] [-d <strDbExec>] [-fp <pathToFile>]" ) endlocal```
3bbaaa6c-5a78-4af9-8107-128fc6c91d13
{ "language": "Batchfile" }
```batchfile ``` Add bat file for vim initialization on windows.
```batchfile mkdir C:\Users\Nathan Mador-House\Documents\gVimPortable\Data\settings\vimfiles\autoload call git clone git://github.com/tpope/vim-surround C:\Users\Nathan Mador-House\Documents\gVimPortable\Data\settings\vimfiles\autoload\ call git clone git://github.com/tpope/vim-commentary.git C:\Users\Nathan Mador-House\Documents\gVimPortable\Data\settings\vimfiles\autoload\ call git clone https://github.com/easymotion/vim-easymotion C:\Users\Nathan Mador-House\Documents\gVimPortable\Data\settings\vimfiles\autoload\ call git clone https://github.com/kien/rainbow_parentheses.vim C:\Users\Nathan Mador-House\Documents\gVimPortable\Data\settings\vimfiles\autoload\ call git clone https://github.com/itchyny/calendar.vim C:\Users\Nathan Mador-House\Documents\gVimPortable\Data\settings\vimfiles\autoload\ call git clone https://github.com/itchyny/lightline.vim C:\Users\Nathan Mador-House\Documents\gVimPortable\Data\settings\vimfiles\autoload\ call git clone https://github.com/Yggdroot/indentLine C:\Users\Nathan Mador-House\Documents\gVimPortable\Data\settings\vimfiles\autoload\ call git clone https://github.com/Raimondi/delimitMate.git C:\Users\Nathan Mador-House\Documents\gVimPortable\Data\settings\vimfiles\autoload\ ```
3f7f80ba-a02e-46e9-b07f-f341e41600c3
{ "language": "Batchfile" }
```batchfile ``` Add a batch script for the first commit.
```batchfile @echo off :: 启动命令处理器扩展名 启动延缓环境变量扩展名 setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION :: 双脱字符的功用 echo Hi there^^! :: 如果是从图形界面(相对于命令行)启动的,则暂停 echo %cmdcmdline% | find "%~0" > nul if %errorlevel% EQU 0 pause :: echo %cmdcmdline% | findstr /c:"%~n0" > nul if %errorlevel% EQU 0 pause ```
dc3cd9cd-6ab7-4a79-9058-581fc0968892
{ "language": "Batchfile" }
```batchfile java -Xrunhprof:cpu=samples -DWNDBVERSION=1.7 -DWNHOME=C:\nlp\opennlp\opennlp\dictionary\src\ -DWNSEARCHDIR=C:\nlp\WordNet\dict\ -jar output\dictionary-0.1.0.jar %1 -g -h -o -a -s -Oop.txt -over -synsa -antsa -perta -famla -synsn -simsn -antsn -coorn -hypen -hypon -treen -holon -sprtn -smemn -ssubn -hholn -meron -subsn -partn -membn -hmern -nomnn -attrn -famln -synsv -simsv -antsv -coorv -hypev -hypov -treev -tropv -entav -causv -nomnv -framv -famlv -synsr -antsr -pertr -famlr ``` Stop error by adding space at end of line
```batchfile java -Xrunhprof:cpu=samples -DWNDBVERSION=1.7 -DWNHOME=C:\nlp\opennlp\opennlp\dictionary\src\ -DWNSEARCHDIR=C:\nlp\WordNet\dict\ -jar output\dictionary-0.1.0.jar %1 -g -h -o -a -s -Oop.txt -over -synsa -antsa -perta -famla -synsn -simsn -antsn -coorn -hypen -hypon -treen -holon -sprtn -smemn -ssubn -hholn -meron -subsn -partn -membn -hmern -nomnn -attrn -famln -synsv -simsv -antsv -coorv -hypev -hypov -treev -tropv -entav -causv -nomnv -framv -famlv -synsr -antsr -pertr -famlr ```
f0bd1eec-525b-45b6-a015-dc099a753d24
{ "language": "Batchfile" }
```batchfile REM Set variables for Microsoft Visual Studio for Python 2.7 REM @call "C:\Users\michaelh3\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" amd64 REM Set environ as workaround for bugs (See http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat and http://bugs.python.org/issue23246) REM SET DISTUTILS_USE_SDK=1 REM SET MSSdk=1 @call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 REM Test build python setup.py sdist bdist_wheel REM Upload to PyPi REM python setup.py sdist bdist_wheel upload ``` Update bat file for Python 3 build
```batchfile REM Set variables for Microsoft Visual Studio for Python 2.7 REM @call "C:\Users\michaelh3\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" amd64 REM Set environ as workaround for bugs (See http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat and http://bugs.python.org/issue23246) REM SET DISTUTILS_USE_SDK=1 REM SET MSSdk=1 REM Set variables for Microsoft Visual Studio for Python 3.6 @call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 REM Test build python setup.py sdist bdist_wheel REM Upload to PyPi REM python setup.py sdist bdist_wheel upload ```
d0277947-de9a-4eff-8f9f-215b9153ffe0
{ "language": "Batchfile" }
```batchfile ``` Add missing gradle wrapper file
```batchfile @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if "%ERRORLEVEL%" == "0" goto init echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto init echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :init @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args :win9xME_args @rem Slurp the command line arguments. set CMD_LINE_ARGS= set _SKIP=2 :win9xME_args_slurp if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% :end @rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal :omega ```
31751b6d-20c4-49d9-93fb-f367c3cac9d2
{ "language": "Batchfile" }
```batchfile @echo off REM This is a script that will set environment information about where to find REM NuGet.exe, it's version and ensure that it's present on the enlistment. set NuGetExeVersion=3.5.0-beta2 set NuGetExeFolder=%~dp0..\..\Binaries\Download\%NuGetExeVersion% set NuGetExe=%NuGetExeFolder%\NuGet.exe REM Download NuGet.exe if we haven't already if not exist "%NuGetExe%" ( echo Downloading NuGet %NuGetExeVersion% powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0download-nuget.ps1" "%NuGetExeVersion%" "%NuGetExeFolder%" || goto :DownloadNuGetFailed ) ``` Move NuGet.exe restore location back to the root
```batchfile @echo off REM This is a script that will set environment information about where to find REM NuGet.exe, it's version and ensure that it's present on the enlistment. set NuGetExeVersion=3.5.0-beta2 set NuGetExeFolder=%~dp0..\.. set NuGetExe=%NuGetExeFolder%\NuGet.exe REM Download NuGet.exe if we haven't already if not exist "%NuGetExe%" ( echo Downloading NuGet %NuGetExeVersion% powershell -noprofile -executionPolicy RemoteSigned -file "%~dp0download-nuget.ps1" "%NuGetExeVersion%" "%NuGetExeFolder%" || goto :DownloadNuGetFailed ) ```
104bef9f-bab1-4f93-90ac-97ff00c1f9fd
{ "language": "Batchfile" }
```batchfile @REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root%\tools call build_dotnet.cmd %* if errorlevel 1 goto :eof call build_uwp.cmd %* if errorlevel 1 goto :eof cd %build-root%``` Fix unit test run error on UWP by not running them
```batchfile @REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root%\tools call build_dotnet.cmd %* if errorlevel 1 goto :eof call build_uwp.cmd --skip-unittests %* if errorlevel 1 goto :eof cd %build-root%```
88dd877b-470c-4aae-b89a-42ce3f719817
{ "language": "Batchfile" }
```batchfile @echo off REM This is a script that will set environment information about where to find REM NuGet.exe, it's version and ensure that it's present on the enlistment. set NuGetExeVersion=3.6.0-beta1 set NuGetExeFolder=%~dp0..\.. set NuGetExe=%NuGetExeFolder%\NuGet.exe if "%VisualStudioVersion%" == "15.0" ( set NuGetAdditionalCommandLineArgs=-verbosity quiet -configfile "%NuGetExeFolder%\nuget.config" -Project2ProjectTimeOut 1200 -msbuildpath "%DevenvDir%\..\..\MSBuild\15.0\Bin" ) else ( set NuGetAdditionalCommandLineArgs=-verbosity quiet -configfile "%NuGetExeFolder%\nuget.config" -Project2ProjectTimeOut 1200 ) REM Download NuGet.exe if we haven't already if not exist "%NuGetExe%" ( echo Downloading NuGet %NuGetExeVersion% powershell -noprofile -executionPolicy Bypass -file "%~dp0download-nuget.ps1" "%NuGetExeVersion%" "%NuGetExeFolder%" || goto :DownloadNuGetFailed ) ``` Update test to check for existence of app-local msbuild instead of version number
```batchfile @echo off REM This is a script that will set environment information about where to find REM NuGet.exe, it's version and ensure that it's present on the enlistment. set NuGetExeVersion=3.6.0-beta1 set NuGetExeFolder=%~dp0..\.. set NuGetExe=%NuGetExeFolder%\NuGet.exe REM If we have an applocal copy of MSBuild, pass it to NuGet. Otherwise, assume NuGet knows how to find it. if exist "%DevenvDir%\..\..\MSBuild\15.0\Bin\MSBuild.exe" ( set NuGetAdditionalCommandLineArgs=-verbosity quiet -configfile "%NuGetExeFolder%\nuget.config" -Project2ProjectTimeOut 1200 -msbuildpath "%DevenvDir%\..\..\MSBuild\15.0\Bin" ) else ( set NuGetAdditionalCommandLineArgs=-verbosity quiet -configfile "%NuGetExeFolder%\nuget.config" -Project2ProjectTimeOut 1200 ) REM Download NuGet.exe if we haven't already if not exist "%NuGetExe%" ( echo Downloading NuGet %NuGetExeVersion% powershell -noprofile -executionPolicy Bypass -file "%~dp0download-nuget.ps1" "%NuGetExeVersion%" "%NuGetExeFolder%" || goto :DownloadNuGetFailed ) ```
8ade1e8c-c4a8-405c-a7db-b13f0d98f0f0
{ "language": "Batchfile" }
```batchfile # This is for windows users only. # If you're on a mac or linux, just run `ant build` from this folder in Terminal set MYDIR=%~dp0 set ANT_OPTS=-D"file.encoding=UTF-8" ant build``` Use REM for comments to avoid error messages on the DOS prompt for Windows users
```batchfile REM # This is for windows users only. REM # If you're on a mac or linux, just run `ant build` from this folder in Terminal set MYDIR=%~dp0 set ANT_OPTS=-D"file.encoding=UTF-8" ant build```
a6589f71-8c53-43e7-8c47-60e53c85d960
{ "language": "Batchfile" }
```batchfile ``` Make working in Command Prompt slightly more bearable
```batchfile @ECHO OFF REM Uncomment to enable verbose mode REM SET VERBOSE=YES REM Because I'm tired of forgetting this DOSKEY ls=dir DOSKEY man=help DOSKEY which=where REM Add alias for Sublime Text SET SUBLREGPATH=HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Sublime Text 2_is1 SET SUBLBINNAME=sublime_text.exe REG QUERY "%SUBLREGPATH%" /v InstallLocation > NUL 2>&1 IF NOT ERRORLEVEL 1 ( FOR /F "tokens=2*" %%a IN ('REG QUERY "%SUBLREGPATH%" /v InstallLocation ^| FINDSTR /R "[a-z]:\\.*\\$"') DO @SET SUBLDIRPATH=%%b DOSKEY subl="%SUBLDIRPATH%%SUBLBINNAME%" $* ) ELSE ( IF DEFINED VERBOSE ECHO Couldn't locate Sublime Text install; not adding 'subl' alias. ) FOR /F "delims==" %%i IN ('SET SUBL') DO @SET %%i= ```
fa238b3b-96b4-4b38-bc7f-ad7fd9eed304
{ "language": "Batchfile" }
```batchfile @echo off cd build cmd /c "build.bat /target:PrepareDependencies" & pause & exit ``` Fix path when right-clicking batch and Running as Administrator
```batchfile @echo off cd /d %~dp0build cmd /c "build.bat /target:PrepareDependencies" & pause & exit ```
437fdf7c-382c-458f-b7d8-168ae0c9ef03
{ "language": "Batchfile" }
```batchfile ``` Add push package script :cow:
```batchfile ..\.nuget\NuGet.exe push ..\Topshelf.Autofac\bin\Release\Topshelf.Autofac.*.nupkg -Source https://www.nuget.org/api/v2/package ```
a5a7772d-156d-4800-9a68-898d278abf83
{ "language": "Batchfile" }
```batchfile ``` Add a build script for code socery gcc.
```batchfile @REM Copyright (c) 2008 - 2010, Apple, Inc. All rights reserved. @REM All rights reserved. This program and the accompanying materials @REM are licensed and made available under the terms and conditions of the BSD License @REM which accompanies this distribution. The full text of the license may be found at @REM http://opensource.org/licenses/bsd-license.php @REM @REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, @REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @REM @REM Example usage of this script. default is a DEBUG build @REM b @REM b clean @REM b release @REM b release clean @REM b -v -y build.log ECHO OFF @REM Setup Build environment. Sets WORKSPACE and puts build in path CALL ..\edksetup.bat @REM Set for tools chain. Currently ARMGCC SET TARGET_TOOLS=ARMGCC SET TARGET=DEBUG @if /I "%1"=="RELEASE" ( @REM If 1st argument is release set TARGET to RELEASE and shift arguments to remove it SET TARGET=RELEASE shift /1 ) SET BUILD_ROOT=%WORKSPACE%\Build\BeagleBoard\%TARGET%_%TARGET_TOOLS% @REM Build the Beagle Board firmware and creat an FD (FLASH Device) Image. CALL build -p BeagleBoardPkg\BeagleBoardPkg.dsc -a ARM -t %TARGET_TOOLS% -b %TARGET% %1 %2 %3 %4 %5 %6 %7 %8 @if ERRORLEVEL 1 goto Exit @if /I "%1"=="CLEAN" goto Clean @REM @REM Ram starts at 0x80000000 @REM OMAP 3530 TRM defines 0x80008208 as the entry point @REM The reset vector is caught by the mask ROM in the OMAP 3530 so that is why this entry @REM point looks so strange. @REM OMAP 3430 TRM section 26.4.8 has Image header information. (missing in OMAP 3530 TRM) @REM @cd Tools ECHO Building tools... CALL nmake ECHO Patching image with ConfigurationHeader.dat CALL GenerateImage -D ..\ConfigurationHeader.dat -E 0x80008208 -I %BUILD_ROOT%\FV\BEAGLEBOARD_EFI.fd -O %BUILD_ROOT%\FV\BeagleBoard_EFI_flashboot.fd ECHO Patching ..\Debugger_scripts ... SET DEBUGGER_SCRIPT=..\Debugger_scripts @for /f %%a IN ('dir /b %DEBUGGER_SCRIPT%\*.inc %DEBUGGER_SCRIPT%\*.cmm') do ( @CALL replace %DEBUGGER_SCRIPT%\%%a %BUILD_ROOT%\%%a ZZZZZZ %BUILD_ROOT% WWWWWW %WORKSPACE% ) cd .. :Exit EXIT /B :Clean cd Tools CALL nmake clean cd .. ```
18c0c29a-e526-4fef-9111-9b0969ddab63
{ "language": "Batchfile" }
```batchfile ``` Add ability to generate nunit test results
```batchfile @pushd %~dp0 ECHO Remember to build the solution first! REM pause "%~dp0\TestHarness\packages\NUnit.Runners.2.6.3\tools\nunit-console.exe" "%~dp0\TestHarness\nunit\bin\Debug\nunitHarness.dll" /result=results-example-nunit.xml /nologo /nodots pause @popd```
26732594-ad42-43e0-ba22-20ce8756c528
{ "language": "Batchfile" }
```batchfile @echo off REM REM Verify that we can find the 'makepanda' python script REM and the python interpreter. If we can find both, then REM run 'makepanda'. REM set thirdparty=thirdparty if defined MAKEPANDA_THIRDPARTY set thirdparty=%MAKEPANDA_THIRDPARTY% if not exist makepanda\makepanda.py goto :missing1 if not exist %thirdparty%\win-python\python.exe goto :missing2 %thirdparty%\win-python\python.exe makepanda\makepanda.py %* if errorlevel 1 if x%1 == x--slavebuild exit 1 goto done :missing1 echo You need to change directory to the root of the panda source tree echo before invoking makepanda. For further install instructions, read echo the installation instructions in the file doc/INSTALL-MK. goto done :missing2 echo You seem to be missing the 'thirdparty' directory. You probably checked echo the source code out from sourceforge. The sourceforge repository is echo missing the 'thirdparty' directory. You will need to supplement the echo code by downloading the 'thirdparty' directory from www.panda3d.org goto done :done ``` Add a check for 32-bit vs 64-bit OS and then use the appropriate python
```batchfile @echo off REM REM Check the Windows architecture and determine with Python REM to use; 64-bit or 32-bit. Verify that we can find the REM 'makepanda' python script and the python interpreter. REM If we can find both, then run 'makepanda'. REM if %PROCESSOR_ARCHITECTURE% == AMD64 ( set pythondir=win-python-x64 ) else ( set pythondir=win-python ) set thirdparty=thirdparty if defined MAKEPANDA_THIRDPARTY set thirdparty=%MAKEPANDA_THIRDPARTY% if not exist makepanda\makepanda.py goto :missing1 if not exist %thirdparty%\%pythondir%\python.exe goto :missing2 %thirdparty%\%pythondir%\python.exe makepanda\makepanda.py %* if errorlevel 1 if x%1 == x--slavebuild exit 1 goto done :missing1 echo You need to change directory to the root of the panda source tree echo before invoking makepanda. For further install instructions, read echo the installation instructions in the file doc/INSTALL-MK. goto done :missing2 echo %thirdparty% echo You seem to be missing the 'thirdparty' directory. You probably checked echo the source code out from sourceforge. The sourceforge repository is echo missing the 'thirdparty' directory. You will need to supplement the echo code by downloading the 'thirdparty' directory from www.panda3d.org goto done :done ```
d45862bb-6b33-4813-be34-76443ed96483
{ "language": "Batchfile" }
```batchfile ``` Add release script for windows
```batchfile @echo off if "%~1" == "" ( echo Usage: release_win.bat path-to-bin-folder goto end ) setlocal set destdir="%cd%\%~1" mkdir build cd build del CMakeCache.txt rem make sure to use default settings cmake -D CMAKE_INSTALL_PREFIX=%destdir% -G "Visual Studio 12 2013 Win64" .. ICProjConvert150 embree.sln /IC /s /f cmake --build . --config Release --target INSTALL -- /m cd .. endlocal :end ```
18f473b1-47e0-4cc1-b1af-aa9b17c72df4
{ "language": "Batchfile" }
```batchfile @echo off set BASENAME=Geocache_Height set BASEPATH=%HOMEPATH%\Documents\Dev\GitHub\userscripts\GeocacheHeight set DEPLOYPATH=%APPDATA%\Mozilla\Firefox\Profiles\6rhioilk.default\gm_scripts\%BASENAME% cd "%BASEPATH%" copy "src\%BASENAME%.meta.js" . copy /b "src\%BASENAME%.meta.js" + src\header.js + "src\formatHeight.js" + "src\%BASENAME%.js" + src\footer.js ".\%BASENAME%.user.js" copy %BASENAME%.meta.js %DEPLOYPATH% copy %BASENAME%.user.js %DEPLOYPATH% copy "src\%BASENAME%_feet.meta.js" . copy /b "src\%BASENAME%_feet.meta.js" + src\header.js + "src\formatHeight_feet.js" + "src\%BASENAME%.js" + src\footer.js ".\%BASENAME%_feet.user.js" copy %BASENAME%_feet.meta.js %DEPLOYPATH% copy %BASENAME%_feet.user.js %DEPLOYPATH% set BASENAME= set BASEPATH=``` Deploy feet version to own folder
```batchfile @echo off set BASENAME=Geocache_Height set BASEPATH=%HOMEPATH%\Documents\Dev\GitHub\userscripts\GeocacheHeight set DEPLOYPATH=%APPDATA%\Mozilla\Firefox\Profiles\6rhioilk.default\gm_scripts\%BASENAME% cd "%BASEPATH%" copy "src\%BASENAME%.meta.js" . copy /b "src\%BASENAME%.meta.js" + src\header.js + "src\formatHeight.js" + "src\%BASENAME%.js" + src\footer.js ".\%BASENAME%.user.js" copy %BASENAME%.meta.js %DEPLOYPATH% copy %BASENAME%.user.js %DEPLOYPATH% copy "src\%BASENAME%_feet.meta.js" . copy /b "src\%BASENAME%_feet.meta.js" + src\header.js + "src\formatHeight_feet.js" + "src\%BASENAME%.js" + src\footer.js ".\%BASENAME%_feet.user.js" copy %BASENAME%_feet.meta.js %DEPLOYPATH%_(feet) copy %BASENAME%_feet.user.js %DEPLOYPATH%_(feet) set BASENAME= set BASEPATH=```
de09ce85-6175-4e8d-9409-65b3f7130d97
{ "language": "Batchfile" }
```batchfile setlocal set BUILDER_START_DIR= set BUILDER_TOP_DIR= set BUILDROOT_DIR= set __CMD_INIT_RUN__= %PYTHON% wb_git_main.py %* endlocal ``` Update to work with common
```batchfile setlocal set PYTHONPATH=%BUILDER_TOP_DIR%\Source;%BUILDER_TOP_DIR%\Source\Common set BUILDER_START_DIR= set BUILDER_TOP_DIR= set BUILDROOT_DIR= set __CMD_INIT_RUN__= echo PYTHONPATH %PYTHONPATH% %PYTHON% wb_git_main.py %* endlocal ```
377883cf-4607-445d-a307-99583ecd5acb
{ "language": "Batchfile" }
```batchfile @echo off setlocal set "output=nul" set "times=1" :help :parseArgs if "%~1" == "" goto main if /i "%~1" == "-?" goto help if /i "%~1" == "-h" goto help if /i "%~1" == "--help" goto help if /i "%~1" == "-t" ( set "times=%~2" shift ) if /i "%~1" == "--times" ( set "times=%~2" shift ) if /i "%~1" == "-o" ( set "output=%~2" shift ) if /i "%~1" == "--output" ( set "output=%~2" shift ) shift :curl @powershell -NoProfile "iwr %~1 -OutFile %~2" 2> nul goto :eof :downloadPackage set "url=https://www.nuget.org/api/v2/package/%~1" call :curl "%url%" %2 goto :eof :main for /l %%i in (1, 1, %times%) do ( call :downloadPackage "%package%" "%output%" ) ``` Fix labels in the cmd script
```batchfile @echo off setlocal set "output=nul" set "times=1" :help goto :eof :parseArgs if "%~1" == "" goto main if /i "%~1" == "-?" goto help if /i "%~1" == "-h" goto help if /i "%~1" == "--help" goto help if /i "%~1" == "-t" ( set "times=%~2" shift ) if /i "%~1" == "--times" ( set "times=%~2" shift ) if /i "%~1" == "-o" ( set "output=%~2" shift ) if /i "%~1" == "--output" ( set "output=%~2" shift ) shift goto parseArgs :curl @powershell -NoProfile "iwr %~1 -OutFile %~2" 2> nul goto :eof :downloadPackage set "url=https://www.nuget.org/api/v2/package/%~1" call :curl "%url%" %2 goto :eof :main for /l %%i in (1, 1, %times%) do ( call :downloadPackage "%package%" "%output%" ) ```
17c2609d-656f-456a-852c-bc85a571b7f4
{ "language": "Batchfile" }
```batchfile @echo off rem ======================================================================== rem rem Copyright 2015-2017 Intel Corporation rem rem rem rem Licensed under the Apache License, Version 2.0 (the "License"); rem rem you may not use this file except in compliance with the License. rem rem You may obtain a copy of the License at rem rem rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem rem rem Unless required by applicable law or agreed to in writing, software rem rem distributed under the License is distributed on an "AS IS" BASIS, rem rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem rem See the License for the specific language governing permissions and rem rem limitations under the License. rem rem ======================================================================== rem setlocal echo Running tests md failed set OSP_LIBS=build\Release set BASELINE_DIR=N:\OSPRay\test-data\img\ set PATH=%PATH%;%OSP_LIBS%;%embree_DIR%\bin call build\regression_tests\Release\ospray_test_suite.exe --gtest_output=xml:tests.xml --baseline-dir=%BASELINE_DIR% exit /B %ERRORLEBEL% endlocal ``` Change baseline path for Win to avoid problematic drive letter
```batchfile @echo off rem ======================================================================== rem rem Copyright 2015-2017 Intel Corporation rem rem rem rem Licensed under the Apache License, Version 2.0 (the "License"); rem rem you may not use this file except in compliance with the License. rem rem You may obtain a copy of the License at rem rem rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem rem rem Unless required by applicable law or agreed to in writing, software rem rem distributed under the License is distributed on an "AS IS" BASIS, rem rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem rem See the License for the specific language governing permissions and rem rem limitations under the License. rem rem ======================================================================== rem setlocal echo Running tests md failed set OSP_LIBS=build\Release set BASELINE_DIR=\\sdvis-nas\NAS\OSPRay\test-data\img\ set PATH=%PATH%;%OSP_LIBS%;%embree_DIR%\bin call build\regression_tests\Release\ospray_test_suite.exe --gtest_output=xml:tests.xml --baseline-dir=%BASELINE_DIR% exit /B %ERRORLEBEL% endlocal ```
7c41e7a4-8435-4af1-8a8d-11785c102db9
{ "language": "Batchfile" }
```batchfile @echo off setlocal enabledelayedexpansion setlocal enableextensions set ES_JAVA_OPTS="--add-opens java.base/sun.security.provider=ALL-UNNAMED %ES_JAVA_OPTS%" set ES_MAIN_CLASS=org.elasticsearch.plugins.PluginCli set ES_ADDITIONAL_CLASSPATH_DIRECTORIES=lib/tools/plugin-cli call "%~dp0elasticsearch-cli.bat" ^ %%* ^ || goto exit endlocal endlocal :exit exit /b %ERRORLEVEL% ``` Fix quoting of ES_JAVA_OPTS in plugin script
```batchfile @echo off setlocal enabledelayedexpansion setlocal enableextensions set ES_JAVA_OPTS=--add-opens java.base/sun.security.provider=ALL-UNNAMED %ES_JAVA_OPTS% set ES_MAIN_CLASS=org.elasticsearch.plugins.PluginCli set ES_ADDITIONAL_CLASSPATH_DIRECTORIES=lib/tools/plugin-cli call "%~dp0elasticsearch-cli.bat" ^ %%* ^ || goto exit endlocal endlocal :exit exit /b %ERRORLEVEL% ```
a54965a9-ad37-4a90-92c1-a624f5a1c785
{ "language": "Batchfile" }
```batchfile @echo off "%PROGRAMFILES%\7-Zip\7z" a -tzip "AITD-tools.zip" ^ ".\CacheViewer\CacheViewer\bin\Release\*.exe" ^ ".\LifeDISA\LifeDISA\bin\Release\*.exe" ^ ".\LifeDISA\LifeDISA\bin\Release\UnPAK.dll" ^ ".\MemoryViewer\MemoryViewer\bin\Release\*.exe" ^ ".\MemoryViewer\MemoryViewer\bin\Release\SDL.dll" ^ ".\MemoryViewer\MemoryViewer\bin\Release\SDL2.dll" ^ ".\MemoryViewer\MemoryViewer\bin\Release\SDL2_image.dll" ^ ".\MemoryViewer\MemoryViewer\bin\Release\Shared.dll" ^ ".\TrackDISA\TrackDISA\bin\Release\*.exe" ^ ".\VarsViewer\VarsViewer\bin\Release\*.exe" ``` Call msbuild from build script
```batchfile @echo off %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /p:Configuration=Release ".\CacheViewer\CacheViewer.sln" if %ERRORLEVEL% NEQ 0 pause %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /p:Configuration=Release ".\LifeDISA\LifeDISA.sln" if %ERRORLEVEL% NEQ 0 pause %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /p:Configuration=Release ".\MemoryViewer\MemoryViewer.sln" if %ERRORLEVEL% NEQ 0 pause %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /p:Configuration=Release ".\TrackDISA\TrackDISA.sln" if %ERRORLEVEL% NEQ 0 pause %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /p:Configuration=Release ".\VarsViewer\VarsViewer.sln" if %ERRORLEVEL% NEQ 0 pause "%PROGRAMFILES%\7-Zip\7z" a -tzip "AITD-tools.zip" ^ ".\CacheViewer\CacheViewer\bin\Release\*.exe" ^ ".\LifeDISA\LifeDISA\bin\Release\*.exe" ^ ".\LifeDISA\LifeDISA\bin\Release\UnPAK.dll" ^ ".\MemoryViewer\MemoryViewer\bin\Release\*.exe" ^ ".\MemoryViewer\MemoryViewer\bin\Release\SDL.dll" ^ ".\MemoryViewer\MemoryViewer\bin\Release\SDL2.dll" ^ ".\MemoryViewer\MemoryViewer\bin\Release\SDL2_image.dll" ^ ".\MemoryViewer\MemoryViewer\bin\Release\Shared.dll" ^ ".\TrackDISA\TrackDISA\bin\Release\*.exe" ^ ".\VarsViewer\VarsViewer\bin\Release\*.exe" ^ "-mx=9" if %ERRORLEVEL% NEQ 0 pause```
1ef8eaa1-2612-4038-b18e-c2af0b1eb834
{ "language": "Batchfile" }
```batchfile ``` Add script to build dev version
```batchfile REM First Run the prepare tasks for each task: REM triggerbuildtask\perpareTriggerBuildTask.bat REM waitforbuildtask\perpareWaitForBuildTask.bat REM Don't forget to increase the version! tfx extension create --manifest-globs .\vss-extension_dev.json```
1736400d-ec6a-4e67-8f6c-81ec7baaa9b7
{ "language": "Batchfile" }
```batchfile @echo off setlocal EnableDelayedExpansion REM Uploading all modules at once (with one gradle command) does not work any more, so a separate command for each module must be issued SET username=%1 SET apikey=%2 SET modules="MediaPlayer" "MediaPlayer-DASH" FOR %%m in (%modules%) DO ( gradlew %%~m:clean %%~m:build %%~m:bintrayUpload -PbintrayUser=%username% -PbintrayKey=%apikey% -PdryRun=false ) ``` Add gradle --configure-on-demand flag to bintray upload script
```batchfile @echo off setlocal EnableDelayedExpansion REM Uploading all modules at once (with one gradle command) does not work any more, so a separate command for each module must be issued SET username=%1 SET apikey=%2 SET modules="MediaPlayer" "MediaPlayer-DASH" FOR %%m in (%modules%) DO ( gradlew %%~m:clean %%~m:build %%~m:bintrayUpload -PbintrayUser=%username% -PbintrayKey=%apikey% -PdryRun=false --configure-on-demand ) ```
37ddd364-d30b-4edd-83ba-d8245b6e26f3
{ "language": "Batchfile" }
```batchfile ### this file is a sample taken from mongo-c-driver-legacy-build. must be adapted to new driver #### robocopy ..\bin\Win32\Debug\ %1\user\mongoc-dll\ mongo-client*.dll /ZB /X /COPYALL /TEE robocopy ..\bin\Win32\Release\ %1\user\mongoc-dll\ mongo-client*.dll /ZB /X /COPYALL /TEE robocopy ..\bin\x64\Debug\ %1\user\mongoc-dll\ mongo-client*.dll /ZB /X /COPYALL /TEE robocopy ..\bin\x64\Release\ %1\user\mongoc-dll\ mongo-client*.dll /ZB /X /COPYALL /TEE EXIT /B 0``` Remove copyall in order to copy to network share
```batchfile ### this file is a sample taken from mongo-c-driver-legacy-build. must be adapted to new driver #### robocopy ..\bin\Win32\Debug\ %1\user\mongoc-dll\ mongo-client*.dll /ZB /X /TEE robocopy ..\bin\Win32\Release\ %1\user\mongoc-dll\ mongo-client*.dll /ZB /X /TEE robocopy ..\bin\x64\Debug\ %1\user\mongoc-dll\ mongo-client*.dll /ZB /X /TEE robocopy ..\bin\x64\Release\ %1\user\mongoc-dll\ mongo-client*.dll /ZB /X /TEE EXIT /B 0 ```
97b7198c-ebb1-4d60-be59-90e434d0930d
{ "language": "Batchfile" }
```batchfile pushd NCDK call :BuildProject NCDK popd pushd NCDKDisplay call :BuildProject NCDK.Display popd goto END :BuildProject set ProjectName=%1 if "%ProjectName%" == "" exit 1 MSBuild "%ProjectName%.csproj" /t:Build /p:Configuration=Release nuget pack "%ProjectName%.nuspec" -Prop Configuration=Release -IncludeReferencedProjects if "%MyNuGetDir%" neq "" ( xcopy /D /Y "*.nupkg" "%MyNuGetDir%" del /Q "*.nupkg" ) set ProjectName= exit /b :END ``` Add installing NuGet packages to build bat file
```batchfile pushd NCDK dotnet add package MathNet.Numerics.Signed dotnet add package dotNetRDF call :BuildProject NCDK popd pushd NCDKDisplay call :BuildProject NCDK.Display popd goto END :BuildProject set ProjectName=%1 if "%ProjectName%" == "" exit 1 MSBuild "%ProjectName%.csproj" /t:Build /p:Configuration=Release nuget pack "%ProjectName%.nuspec" -Prop Configuration=Release -IncludeReferencedProjects if "%MyNuGetDir%" neq "" ( xcopy /D /Y "*.nupkg" "%MyNuGetDir%" del /Q "*.nupkg" ) set ProjectName= exit /b :END ```
af37c5f7-804e-4290-b5d1-b8b2f4ea733e
{ "language": "Batchfile" }
```batchfile set path=%userprofile%\Downloads\instantclient-basic-windows.x64-12.1.0.1.0\instantclient_12_1\vc11;%userprofile%\Downloads\instantclient-basic-windows.x64-12.1.0.1.0\instantclient_12_1;%path% copy packages\oracledart\oracledart_extension.dll packages\oracledart\oracledart_extension_ia32.dll copy packages\oracledart\oracledart_extension_x64.dll packages\oracledart\oracledart_extension.dll ..\build\ReleaseX64\dart oracledart_test.dart del packages\oracledart\oracledart_extension.dll copy packages\oracledart\oracledart_extension_ia32.dll packages\oracledart\oracledart_extension.dll del packages\oracledart\oracledart_extension_ia32.dll``` Fix error propagation for windows x64 build script
```batchfile set path=%userprofile%\Downloads\instantclient-basic-windows.x64-12.1.0.1.0\instantclient_12_1\vc11;%userprofile%\Downloads\instantclient-basic-windows.x64-12.1.0.1.0\instantclient_12_1;%path% copy packages\oracledart\oracledart_extension.dll packages\oracledart\oracledart_extension_ia32.dll copy packages\oracledart\oracledart_extension_x64.dll packages\oracledart\oracledart_extension.dll ..\build\ReleaseX64\dart oracledart_test.dart set buildexitcode=%ERRORLEVEL% del packages\oracledart\oracledart_extension.dll copy packages\oracledart\oracledart_extension_ia32.dll packages\oracledart\oracledart_extension.dll del packages\oracledart\oracledart_extension_ia32.dll exit /b %buildexitcode%```
5398d2df-5517-4ec4-889a-684d445a832a
{ "language": "Batchfile" }
```batchfile Set DecorateName=DecorateName Set Book=mencius Set FontType=Traditional Set BookFont=%Book%_%FontType% Set CSSExt=.css Set CSS_=--css=..\css\ Set NameStyle=%CSS_%%DecorateName%%CSSExt% Set Output=%BookFont% If "%1" == "name" ( Set Output=%Output%_%DecorateName% Set Style=%NameStyle% ) If Not "%2" == "" ( Set Output=%Output%_%2 Set Style=%Style% %CSS_%%2%CSSExt% ) If Not "%3" == "" ( Set Output=%Output%_%3 Set Style=%Style% %CSS_%%3%CSSExt% ) Set HTMLExt=.html Set HTMLOutput=%Output%%HTMLExt% Call pandoc ..\source\%Book%.md -o %HTMLOutput% --standalone --toc %Style% --verbose Call wkhtmltopdf.exe --margin-top 15 --margin-bottom 15 --header-center [section] --header-left [subsection] --header-right [page] --header-line --header-spacing 5 --footer-center "Version 0.1" --footer-line --footer-spacing 5 %HTMLOutput% %Output%.pdf``` Build header and footer properly
```batchfile Set DecorateName=DecorateName Set Book=mencius Set FontType=Traditional Set BookFont=%Book%_%FontType% Set CSSExt=.css Set CSS_=--css=..\css\ Set NameStyle=%CSS_%%DecorateName%%CSSExt% Set Output=%BookFont% If "%1" == "name" ( Set Output=%Output%_%DecorateName% Set Style=%NameStyle% ) If Not "%2" == "" ( Set Output=%Output%_%2 Set Style=%Style% %CSS_%%2%CSSExt% ) If Not "%3" == "" ( Set Output=%Output%_%3 Set Style=%Style% %CSS_%%3%CSSExt% ) Set HTMLExt=.html Set HTMLOutput=%Output%%HTMLExt% Call pandoc ..\source\%Book%.md -o %HTMLOutput% --standalone --toc %Style% --verbose Call wkhtmltopdf.exe --margin-top 15 --header-spacing 5 --header-right [subsection] --header-line --margin-bottom 15 --footer-spacing 5 --footer-left "Dujing Academy" --footer-right [page]/[topage] --footer-line --footer-font-size 5 %HTMLOutput% %Output%.pdf```
3cffc073-7db7-42ef-b39b-405a4958c38a
{ "language": "Batchfile" }
```batchfile # This is for windows users only. # If you're on a mac or linux, just run `ant build` from this folder in Terminal set MYDIR=%~dp0 set ANT_OPTS=-D"file.encoding=UTF-8" ant build``` Use REM for comments to avoid error messages on the DOS prompt for Windows users
```batchfile REM # This is for windows users only. REM # If you're on a mac or linux, just run `ant build` from this folder in Terminal set MYDIR=%~dp0 set ANT_OPTS=-D"file.encoding=UTF-8" ant build```
568c1f2c-5900-47fb-b969-db9adfc35a36
{ "language": "Batchfile" }
```batchfile copy ..\README.md ..\Output copy ..\LICENSE ..\Output copy ..\AUTHORS ..\Output copy ..\CONTRIBUTORS ..\Output mkdir ..\Output\lib mkdir ..\Output\lib\MonoTouch mkdir ..\Output\lib\MonoAndroid mkdir ..\Output\lib\Xamarin.iOS10 copy ..\Output\XamarinIOS\OxyPlot.XamarinIOS.??? ..\Output\lib\MonoTouch copy ..\Output\XamarinAndroid\OxyPlot.XamarinAndroid.??? ..\Output\lib\MonoAndroid copy ..\Output\Xamarin.iOS\OxyPlot.Xamarin.iOS.??? ..\Output\lib\Xamarin.iOS10 copy ..\Source\OxyPlot.XamarinIOS\*.nuspec ..\Output copy ..\Source\OxyPlot.XamarinAndroid\*.nuspec ..\Output nuget pack ..\Output\OxyPlot.XamarinIOS.nuspec -OutputDirectory ..\Output nuget pack ..\Output\OxyPlot.XamarinAndroid.nuspec -OutputDirectory ..\Output nuget pack ..\Source\OxyPlot.XamarinForms/OxyPlot.XamarinForms.nuspec -OutputDirectory ../Output pause``` Correct output path for nuget pack command
```batchfile copy ..\README.md ..\Output copy ..\LICENSE ..\Output copy ..\AUTHORS ..\Output copy ..\CONTRIBUTORS ..\Output mkdir ..\Output\lib mkdir ..\Output\lib\MonoTouch mkdir ..\Output\lib\MonoAndroid mkdir ..\Output\lib\Xamarin.iOS10 copy ..\Output\XamarinIOS\OxyPlot.XamarinIOS.??? ..\Output\lib\MonoTouch copy ..\Output\XamarinAndroid\OxyPlot.XamarinAndroid.??? ..\Output\lib\MonoAndroid copy ..\Output\Xamarin.iOS\OxyPlot.Xamarin.iOS.??? ..\Output\lib\Xamarin.iOS10 copy ..\Source\OxyPlot.XamarinIOS\*.nuspec ..\Output copy ..\Source\OxyPlot.XamarinAndroid\*.nuspec ..\Output nuget pack ..\Output\OxyPlot.XamarinIOS.nuspec -OutputDirectory ..\Output nuget pack ..\Output\OxyPlot.XamarinAndroid.nuspec -OutputDirectory ..\Output nuget pack ..\Source\OxyPlot.XamarinForms/OxyPlot.XamarinForms.nuspec -OutputDirectory ..\Output pause```
3723052d-fbc9-4711-9dc6-0dc0b615a9ea
{ "language": "Batchfile" }
```batchfile ``` Add batch file that generates the local directory structure to allow the new AVR32 UC3 demo to be build using an Eclipse managed make project.
```batchfile REM This file should be executed from the command line prior to the first REM build. It will be necessary to refresh the Eclipse project once the REM .bat file has been executed (normally just press F5 to refresh). REM Copies all the required files from their location within the standard REM FreeRTOS directory structure to under the Eclipse project directory. REM This permits the Eclipse project to be used in 'managed' mode and without REM having to setup any linked resources. REM Have the files already been copied? IF EXIST FreeRTOS Goto END REM Create the required directory structure. MD FreeRTOS MD FreeRTOS\include MD FreeRTOS\portable\GCC\AVR32_UC3 MD FreeRTOS\portable\MemMang MD Common_Demo_Tasks MD Common_Demo_Tasks\Minimal MD Common_Demo_Tasks\include REM Copy the core kernel files. copy ..\..\Source\*.* FreeRTOS REM Copy the common header files copy ..\..\Source\include\*.* FreeRTOS\include REM Copy the portable layer files copy ..\..\Source\portable\GCC\AVR32_UC3\*.* FreeRTOS\portable\GCC\AVR32_UC3 REM Copy the basic memory allocation files copy ..\..\Source\portable\MemMang\heap_3.c FreeRTOS\portable\MemMang REM Copy the files that define the common demo tasks. copy ..\common\Minimal\BlockQ.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\comtest.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\death.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\dynamic.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\flash.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\flop.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\integer.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\PollQ.c Common_Demo_Tasks\Minimal copy ..\common\Minimal\semtest.c Common_Demo_Tasks\Minimal REM Copy the common demo file headers. copy ..\common\include\*.* Common_Demo_Tasks\include : END ```
598d1629-94a1-4123-9e3e-f465650affb6
{ "language": "Batchfile" }
```batchfile cd /d "%~dp0" cd .. rmdir /s /q install rmdir /s /q build mkdir build cd build cmake .. -G "Visual Studio 12" "-DCMAKE_INSTALL_PREFIX=%WORKSPACE%\install" %* cmake --build . --config Debug cmake --build . --config RelWithDebInfo "%WORKSPACE%\vendor\jenkins-ctest-plugin\run-test-and-save.bat" -C Debug "%WORKSPACE%\vendor\jenkins-ctest-plugin\run-test-and-save.bat" -C RelWithDebInfo cmake --build . --config Debug --target INSTALL cmake --build . --config RelWithDebInfo --target INSTALL cmake --build . --config RelWithDebInfo --target ogvrPluginKit -- /p:RunCodeAnalysis=True rem bin\Debug\LoadTest.exe --gtest_output=xml:test_details.Debug.xml rem bin\RelWithDebInfo\LoadTest.exe --gtest_output=xml:test_details.RelWithDebInfo.xml pause``` Call the testing batch files, don't just go there permanently.
```batchfile cd /d "%~dp0" cd .. rmdir /s /q install rmdir /s /q build mkdir build cd build cmake .. -G "Visual Studio 12" "-DCMAKE_INSTALL_PREFIX=%WORKSPACE%\install" %* cmake --build . --config Debug cmake --build . --config RelWithDebInfo call "%WORKSPACE%\vendor\jenkins-ctest-plugin\run-test-and-save.bat" -C Debug call "%WORKSPACE%\vendor\jenkins-ctest-plugin\run-test-and-save.bat" -C RelWithDebInfo cmake --build . --config Debug --target INSTALL cmake --build . --config RelWithDebInfo --target INSTALL cmake --build . --config RelWithDebInfo --target ogvrPluginKit -- /p:RunCodeAnalysis=True rem bin\Debug\LoadTest.exe --gtest_output=xml:test_details.Debug.xml rem bin\RelWithDebInfo\LoadTest.exe --gtest_output=xml:test_details.RelWithDebInfo.xml pause```
3c86dde0-a8b3-46cb-84a2-31bfbb925a25
{ "language": "Batchfile" }
```batchfile set result=0 :top if "%1" == "" goto :end echo RUNNING TESTS FOR %1 cd %1 || exit /b 1 if exist tests ( nosetests -v --nologcapture tests || set result=1 && goto :continue ) else if exist test.py ( nosetests -v --nologcapture test.py || set result=1 && goto :continue ) else ( echo Unknown test configuration && set result=1 && goto :continue ) :continue cd .. shift echo ------------------------------------------ goto :top :end exit /b %result% ``` Set NOSE_PROCESS_RESTARTWORKER for appveyor tests
```batchfile set result=0 :top if "%1" == "" goto :end echo RUNNING TESTS FOR %1 cd %1 || exit /b 1 env set NOSE_PROCESS_RESTARTWORKER=1 if exist tests ( nosetests -v --nologcapture tests || set result=1 && goto :continue ) else if exist test.py ( nosetests -v --nologcapture test.py || set result=1 && goto :continue ) else ( echo Unknown test configuration && set result=1 && goto :continue ) :continue cd .. shift echo ------------------------------------------ goto :top :end exit /b %result% ```
de685ed8-6232-4dc7-8da5-7b9557313e94
{ "language": "Batchfile" }
```batchfile RMDIR "%~dp0..\Drops" /S /Q MKDIR "%~dp0..\Drops" MKDIR "%~dp0..\Drops\Temp" MKDIR "%~dp0..\Drops\Temp\agent" MKDIR "%~dp0..\Drops\Temp\agent\bin" XCOPY /E /Y "%~dp0..\Solutions\*.*" "%~dp0..\Drops\Temp" XCOPY /E /Y "%~dp0..\..\src\OctopusPuppet.Cmd\bin\Release\*.*" "%~dp0..\Drops\Temp\agent\bin" DEL "%~dp0..\Drops\Temp\agent\bin\*.xml" DEL "%~dp0..\Drops\Temp\agent\bin\*.pdb" @PowerShell -File %~dp0Create-Zip.ps1 %~dp0..\Drops\Temp\agent\ %~dp0..\Drops\Temp\agent\octopuspuppet-metarunner.zip DEL "%~dp0..\Drops\Temp\agent\*.xml" RMDIR "%~dp0..\Drops\Temp\agent\bin" /S /Q @PowerShell -File "%~dp0Create-Zip.ps1" -target %~dp0..\Drops\Temp\ %~dp0..\Drops\octopuspuppet-metarunner.zip RMDIR "%~dp0..\Drops\Temp\" /S /Q``` Move output of teamcity plugin to root directory for easier urls in AppVeyor
```batchfile RMDIR "%~dp0..\Drops" /S /Q MKDIR "%~dp0..\Drops" MKDIR "%~dp0..\Drops\Temp" MKDIR "%~dp0..\Drops\Temp\agent" MKDIR "%~dp0..\Drops\Temp\agent\bin" XCOPY /E /Y "%~dp0..\Solutions\*.*" "%~dp0..\Drops\Temp" XCOPY /E /Y "%~dp0..\..\src\OctopusPuppet.Cmd\bin\Release\*.*" "%~dp0..\Drops\Temp\agent\bin" DEL "%~dp0..\Drops\Temp\agent\bin\*.xml" DEL "%~dp0..\Drops\Temp\agent\bin\*.pdb" @PowerShell -File %~dp0Create-Zip.ps1 %~dp0..\Drops\Temp\agent\ %~dp0..\Drops\Temp\agent\octopuspuppet-metarunner.zip DEL "%~dp0..\Drops\Temp\agent\*.xml" RMDIR "%~dp0..\Drops\Temp\agent\bin" /S /Q @PowerShell -File "%~dp0Create-Zip.ps1" -target %~dp0..\Drops\Temp\ %~dp0..\..\octopuspuppet-metarunner.zip RMDIR "%~dp0..\Drops\Temp\" /S /Q```
208f497b-b6f0-47a4-8da8-93ec3fbe883f
{ "language": "Batchfile" }
```batchfile @echo off if exist "C:\Work\D\Vvmn\*" goto deleteDir echo No existing build directory goto updateScripts :deleteDir echo Delete directory pushd "C:\Work\D\Vvmn" for /d %%d in (*.*) do rmdir /s /q "%%d" del /q *.* popd :updateScripts cd C:\Work\VesselView\Dashboards\VesselView "C:\Program Files (x86)\Git\bin\git" fetch origin "C:\Program Files (x86)\Git\bin\git" reset --hard master :startDashboards echo Start dashboards call "C:\Program Files (x86)\CMake 2.8.11.2\bin\ctest.exe" -S C:\Work\VesselView\Dashboards\VesselView\Utilities\Dashboards\VesselView-errai-master-nightly.cmake -V -C Release > C:\Work\VesselView\Dashboards\Logs\VesselView-errai-master-nightly.log 2>&1 ``` Upgrade Erai to use CMake 3.0.2
```batchfile @echo off if exist "C:\Work\D\Vvmn\*" goto deleteDir echo No existing build directory goto updateScripts :deleteDir echo Delete directory pushd "C:\Work\D\Vvmn" for /d %%d in (*.*) do rmdir /s /q "%%d" del /q *.* popd :updateScripts cd C:\Work\VesselView\Dashboards\VesselView "C:\Program Files (x86)\Git\bin\git" fetch origin "C:\Program Files (x86)\Git\bin\git" reset --hard master :startDashboards echo Start dashboards call "C:\Program Files (x86)\CMake 3.0.2\bin\ctest.exe" -S C:\Work\VesselView\Dashboards\VesselView\Utilities\Dashboards\VesselView-errai-master-nightly.cmake -V -C Release > C:\Work\VesselView\Dashboards\Logs\VesselView-errai-master-nightly.log 2>&1 ```
6bcdfc65-5b9d-48cd-90bc-1af70f15771a
{ "language": "Batchfile" }
```batchfile @ECHO off @SET LIT_VERSION=1.1.4 IF NOT "x%1" == "x" GOTO :%1 :luvit IF NOT EXIST lit.exe CALL make.bat lit ECHO "Building luvit" lit.exe make GOTO :end :lit ECHO "Building lit" PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/%LIT_VERSION%/get-lit.ps1'))" GOTO :end :test IF NOT EXIST luvit.exe CALL make.bat luvit ECHO "Testing luvit" SET LUVI_APP=. luvit.exe tests\run.lua SET "LUVI_APP=" GOTO :end :clean IF EXIST luvit.exe DEL /F /Q luvit.exe IF EXIST lit.exe DEL /F /Q lit.exe :end ``` Update lit version to fix windows build
```batchfile @ECHO off @SET LIT_VERSION=1.1.8 IF NOT "x%1" == "x" GOTO :%1 :luvit IF NOT EXIST lit.exe CALL make.bat lit ECHO "Building luvit" lit.exe make GOTO :end :lit ECHO "Building lit" PowerShell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://github.com/luvit/lit/raw/%LIT_VERSION%/get-lit.ps1'))" GOTO :end :test IF NOT EXIST luvit.exe CALL make.bat luvit ECHO "Testing luvit" SET LUVI_APP=. luvit.exe tests\run.lua SET "LUVI_APP=" GOTO :end :clean IF EXIST luvit.exe DEL /F /Q luvit.exe IF EXIST lit.exe DEL /F /Q lit.exe :end ```
6c6d5c5d-91c6-41b7-8e9a-f29a0d34c207
{ "language": "Batchfile" }
```batchfile @echo off IF "%1"=="" GOTO USAGE schtasks /create /tn "DeviceHive - Refresh Device Status" /tr "%CD%\curl.exe %1/cron/RefreshDeviceStatus" /sc minute /mo 5 /ru System schtasks /create /tn "DeviceHive - Cleanup Database" /tr "%CD%\curl.exe %1/cron/Cleanup" /sc daily /mo 1 /st 04:00 /ru System GOTO DONE :USAGE ECHO Usage: schedule_tasks.bat [API_URL] ECHO Example: schedule_tasks.bat http://localhost/api :DONE ``` Fix directory path in task scheduler script.
```batchfile @echo off IF "%1"=="" GOTO USAGE schtasks /create /tn "DeviceHive - Refresh Device Status" /tr "%~dp0curl.exe %1/cron/RefreshDeviceStatus" /sc minute /mo 5 /ru System schtasks /create /tn "DeviceHive - Cleanup Database" /tr "%~dp0curl.exe %1/cron/Cleanup" /sc daily /mo 1 /st 04:00 /ru System GOTO DONE :USAGE ECHO Usage: schedule_tasks.bat [API_URL] ECHO Example: schedule_tasks.bat http://localhost/api :DONE ```
e93621aa-ae7b-4221-8e1b-e60c53b284aa
{ "language": "Batchfile" }
```batchfile ``` Include a jade wrapper that emits an ".htm" file instead of ".html"
```batchfile @echo off REM Usage: BloomJade mytemplate.jade --someargument someargument REM the %~2 %~3 here are just places for optional arguments to get REM passed through to JADE. If they're missing, no problem. REM The %~1 is the jade file name. call jade --pretty %~2 %~3 %~1 >&2 if errorlevel 1 goto :eof call del %~n1.htm rename %~n1.html %~n1.htm echo Saved as %~n1.htm```
8c04115d-be0e-481d-afec-cee017ffb131
{ "language": "Batchfile" }
```batchfile @echo off set fake_args=%* cd "._fake" call "paket.bat" "restore" cd ".." "._fake\packages\FAKE\tools\FAKE.exe" "build.fsx" %fake_args% ``` Use paket install instead of paket restore
```batchfile @echo off set fake_args=%* cd "._fake" call "paket.bat" "install" cd ".." "._fake\packages\FAKE\tools\FAKE.exe" "build.fsx" %fake_args% ```
1fa94205-9f3e-49f8-bd24-56d0b027a82f
{ "language": "Batchfile" }
```batchfile set SPECWARE4=C:\Progra~1\Specware4 rem SWPATH needs /s rather than \s so URI parsing works set SWPATH=/Progra~1/Specware4;/ set XEMACS=C:\Progra~1\XEmacs\XEmacs-21.4.6 rem Set allegro to the version you have set ALLEGRO=C:\Progra~1\acl62 rem set ALLEGRO=C:\Progra~1\acl61 set SPECWARE_BIN=%SPECWARE4%\Applications\Specware\bin\windows set LISP_EXECUTABLE=%ALLEGRO%\alisp.exe set LISP_HEAP_IMAGE=%SPECWARE_BIN%\Specware4.dxl set LISP_DIRECTORY=%Specware4%/ cd "%Specware4%" %XEMACS%\i586-pc-win32\xemacs.exe -debug-init -l "%ALLEGRO%/xeli/fi-site-init" -l "%SPECWARE4%/Library/IO/Emacs/load" -f "run-specware4" & ``` Improve startup script for windows
```batchfile set SPECWARE4=C:\Progra~1\Specware4 rem SWPATH needs /s rather than \s so URI parsing works set SWPATH=C:/Progra~1/Specware4;C:/ set XEMACS=C:\Progra~1\XEmacs\XEmacs-21.4.6 rem Set allegro to the version you have set ALLEGRO=C:\Progra~1\acl62 rem set ALLEGRO=C:\Progra~1\acl61 set SPECWARE_BIN=%SPECWARE4%\Applications\Specware\bin\windows set LISP_EXECUTABLE=%ALLEGRO%\alisp.exe set LISP_HEAP_IMAGE=%SPECWARE_BIN%\Specware4.dxl set LISP_DIRECTORY=%Specware4%/ cd "%Specware4%" %XEMACS%\i586-pc-win32\xemacs.exe -debug-init -l "%ALLEGRO%/xeli/fi-site-init" -l "%SPECWARE4%/Library/IO/Emacs/load" -f "run-specware4" & ```
3276b3d6-ee01-4183-83f2-a1f6d79a9e0b
{ "language": "Batchfile" }
```batchfile @ECHO OFF TITLE 3RVX Installer Builder ECHO " _____ ______ ____ _______ " ECHO " |___ /| _ \ \ / /\ \/ /___ / " ECHO " |_ \| |_) \ \ / / \ / |_ \ " ECHO " ___) | _ < \ V / / \ ___) | " ECHO " |____/|_| \_\ \_/ /_/\_\____/ " ECHO " " ECHO This script will generate a 3RVX installer. set /p version= "Enter 3RVX Version (X.X): " ECHO. ECHO Setting Version: %version% ECHO. ECHO Setting PATH... ECHO ON set PATH=%PATH%;%WIX%\bin heat dir ../Release -gg -srd -cg 3RVXComponents -dr INSTALLFOLDER -out 3RVXComponents.wxs candle -pedantic -dProductVersion=%version%.0.0 ./3RVX.wxs ./3RVXComponents.wxs light -b ../Release -ext WixUIExtension ./3RVX.wixobj ./3RVXComponents.wixobj -o 3RVX.msi del 3RVX.wixobj 3RVX.wixpdb 3RVXComponents.wxs 3RVXComponents.wixobj @PAUSE``` Add support for creating zip distributions to the install script
```batchfile @ECHO OFF TITLE 3RVX Installer Builder ECHO " _____ ______ ____ _______ " ECHO " |___ /| _ \ \ / /\ \/ /___ / " ECHO " |_ \| |_) \ \ / / \ / |_ \ " ECHO " ___) | _ < \ V / / \ ___) | " ECHO " |____/|_| \_\ \_/ /_/\_\____/ " ECHO " " ECHO This script will generate a 3RVX installer. set /p version= "Enter 3RVX Version (X.X): " ECHO. ECHO Setting Version: %version% ECHO. ECHO Setting PATH... ECHO ON set PATH=%PATH%;%WIX%\bin heat dir ../Release -gg -srd -cg 3RVXComponents -dr INSTALLFOLDER -out 3RVXComponents.wxs candle -pedantic -dProductVersion=%version%.0.0 ./3RVX.wxs ./3RVXComponents.wxs light -b ../Release -ext WixUIExtension ./3RVX.wixobj ./3RVXComponents.wixobj -o 3RVX.msi del 3RVX.wixobj 3RVX.wixpdb 3RVXComponents.wxs 3RVXComponents.wixobj @ECHO OFF ECHO. ECHO. IF EXIST "7za.exe" ( ECHO Creating .zip distribution... ECHO. ECHO ON del 3RVX-%version%.zip copy "..\Assets\EmptySettings.xml" "..\Release\Settings.xml" 7za a -tzip -mx9 3RVX-%version%.zip ../Release/* ) @ECHO OFF ECHO. PAUSE```
dae4079a-98f9-48fe-a61b-5e7bc32924a2
{ "language": "Batchfile" }
```batchfile ..\Tools\Lynx\WikiPad.exe Index.wikiproj``` Copy style and images to output in edit documentation script
```batchfile copy style.css ..\Output\Documentation copy Images ..\Output\Documentation\Images ..\Tools\Lynx\WikiPad.exe Index.wikiproj```
928ae20b-c47e-4432-a9a4-e7c5622c5719
{ "language": "Batchfile" }
```batchfile @if "%config%" == "" set config=Debug call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" msbuild GitHubVS.sln /p:Configuration=%Config% ``` Build the GitHub.VisualStudio project and VSIX file
```batchfile @if "%config%" == "" set config=Debug call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" @rem Build the GitHub.VisualStudio project / VSIX file msbuild GitHubVS.sln /p:Configuration=%Config% /t:GitHub_VisualStudio```
e74c0d7f-6ea6-48b8-b79f-8d74389949b9
{ "language": "Batchfile" }
```batchfile REM @echo off set MYDIRBLOCK=%~dp0 call %MYDIRBLOCK%..\..\..\config_env_base.bat %HIDEWINDOW% h set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1 set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255 set PYTHONUNBUFFERED=TRUE set MYDIRGATE=%MYDIRBLOCK%..\..\..\gateway if exist "%ICPSETTINGSDIR%/gwblock.pvlist" ( set GWBLOCK_PVLIST=%ICPSETTINGSDIR%/gwblock.pvlist ) else ( set GWBLOCK_PVLIST=%MYDIRGATE%\gwblock_dummy.pvlist ) %PYTHONW% %MYDIRBLOCK%\block_server.py -od %MYDIRBLOCK%..\..\..\iocstartup -sd %MYDIRBLOCK%\schema\ -cd %ICPCONFIGROOT% -pv %GWBLOCK_PVLIST% -f ISIS ``` Set up filewatcher on scripts directory
```batchfile REM @echo off set MYDIRBLOCK=%~dp0 call %MYDIRBLOCK%..\..\..\config_env_base.bat %HIDEWINDOW% h set EPICS_CAS_INTF_ADDR_LIST=127.0.0.1 set EPICS_CAS_BEACON_ADDR_LIST=127.255.255.255 set PYTHONUNBUFFERED=TRUE set MYDIRGATE=%MYDIRBLOCK%..\..\..\gateway if exist "%ICPSETTINGSDIR%/gwblock.pvlist" ( set GWBLOCK_PVLIST=%ICPSETTINGSDIR%/gwblock.pvlist ) else ( set GWBLOCK_PVLIST=%MYDIRGATE%\gwblock_dummy.pvlist ) %PYTHONW% %MYDIRBLOCK%\block_server.py -od %MYDIRBLOCK%..\..\..\iocstartup -sd %MYDIRBLOCK%\schema\ -cd %ICPCONFIGROOT% -sd %ICPINSTSCRIPTROOT% -pv %GWBLOCK_PVLIST% -f ISIS ```
731e8525-e621-4c0d-ae47-5314e93f9675
{ "language": "Batchfile" }
```batchfile ECHO Get revision number from git echo // Pre build automatically generated header file> GitRevision.h REM We use SET/P to do an echo without newline set /p="#define GITREVISION " >> GitRevision.h REM Count number of commits (relies on Git being installed) git rev-list HEAD | find /v /c "" >> GitRevision.h ``` Make prebuild more flexible by trying to find where git is installed
```batchfile ECHO Get revision number from git echo // Automatically generated header file created by Prebuild.bat > GitRevision.h REM We use SET/P to do an echo without newline set /p="#define GITREVISION " >> GitRevision.h REM Count number of commits (relies on Git being installed somewhere) IF NOT EXIST "C:\Program Files (x86)\Git\bin\git.exe" goto next1 "C:\Program Files (x86)\Git\bin\git.exe" rev-list HEAD | find /v /c "" >> GitRevision.h goto end :next1 IF NOT EXIST "C:\Program Files (x86)\SmartGit\git\bin\git.exe" goto next2 "C:\Program Files (x86)\SmartGit\git\bin\git.exe" rev-list HEAD | find /v /c "" >> GitRevision.h goto end :next2 REM Just try running git and hope it's in the path git rev-list HEAD | find /v /c "" >> GitRevision.h :end ```
85458b56-87c9-4696-9d1a-379a60483845
{ "language": "Batchfile" }
```batchfile ``` Add Bach's DOS launch batch script
```batchfile @ECHO OFF :BEGIN IF [%1]==[boot] GOTO :BOOT IF [%1]==[clean] GOTO :CLEAN IF [%1]==[describe] GOTO :DESCRIBE IF [%1]==[/?] GOTO :HELP IF [%1]==[help] GOTO :HELP IF [%1]==[version] GOTO :VERSION java --module-path .bach\cache --module com.github.sormuras.bach %* GOTO :END :BOOT jshell https://github.com/sormuras/bach/raw/HEAD/.bach/boot.jsh GOTO :END :CLEAN IF EXIST .bach\workspace rmdir /q/s .bach\workspace SHIFT IF [%1]==[] GOTO :END GOTO :BEGIN :VERSION IF [%2]==[] GOTO :DESCRIBE jshell -R-Dversion=%2 https://github.com/sormuras/bach/raw/HEAD/.bach/pull.jsh GOTO :END :DESCRIBE java --module-path .bach\cache --describe-module com.github.sormuras.bach GOTO :END :HELP ECHO. ECHO Usage: %0 [action] [args...] ECHO. ECHO Where actions include: ECHO. ECHO boot ECHO Launch an interactive JShell session with Bach's module on the module-path. ECHO. ECHO describe ECHO Describe module com.github.sormuras.bach and exit. ECHO. ECHO version [tag] ECHO Download Bach for the specified version tag. ECHO Find released version tags at https://github.com/sormuras/bach/releases ECHO If no tag is given a description of the current module is printed. ECHO Example: %0 version 15-ea+2 ECHO. :END ```