File: build-and-run.bat

package info (click to toggle)
fsharp 3.1.1.26%2Bdfsg2-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 59,244 kB
  • ctags: 4,190
  • sloc: cs: 13,398; ml: 1,098; sh: 399; makefile: 293; xml: 82
file content (52 lines) | stat: -rw-r--r-- 1,133 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@if "%_echo%"=="" echo off

setlocal
set _ScriptHome=%~dp0%

if "%_UNATTENDEDLOG%"== "" set _UNATTENDEDLOG=%~dp0%\build-and-run.log
echo Start: >_UNATTENDEDLOG

if exist tdirs (
    for /f %%i in (tdirs) do ( 
        if exist "%%i" (
            pushd %%i
            echo **************************************************
            cd
            cd >> %_UNATTENDEDLOG%
            echo **************************************************
            call %_ScriptHome%\build-and-run.bat
            if ERRORLEVEL 1 goto Exit
            popd
        )
    )
)

if NOT exist tdirs (
    if exist build.bat (
        call .\build.bat
        if ERRORLEVEL 1 exit /b 1
    )
    
    if exist run.bat (
        call .\run.bat
        if ERRORLEVEL 1 exit /b 1
    ) 

    if NOT exist build.bat (
        if NOT exist run.bat ( 
            echo FAILURE: build.bat and run.bat not found.  Check %CD%\..\tdirs
            call .\build.bat > NUL 2>&1
            if ERRORLEVEL 1 goto Error
        )
    )
)

:Exit
endlocal

exit /b %ERRORLEVEL%

:Error
call %_ScriptHome%\ChompErr.bat %ERRORLEVEL% %~f0
endlocal
exit /b %ERRORLEVEL%