-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathlevain.cmd
More file actions
49 lines (36 loc) · 788 Bytes
/
Copy pathlevain.cmd
File metadata and controls
49 lines (36 loc) · 788 Bytes
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
@echo off
SETLOCAL
set myPath=%~dp0
:: removing the trailing backslash
set myPath=%myPath:~0,-1%
call:fnRun %*
if "a%ERRORLEVEL%" == "a42" (
call:fnUpgrade %*
echo.
echo After Levain upgrade, please re-execute your previous command.
echo %0 %*
echo.
exit /b 0
)
exit /b %ERRORLEVEL%
:fnRun
set DENO_NO_UPDATE_CHECK=true
set NO_COLOR=true
set DENO_DIR=%myPath%\build
%myPath%\build\levain.exe %*
if errorlevel 1 exit /b %ERRORLEVEL%
goto:eof
:fnUpgrade
echo.
echo LEVAIN UPGRADE!
echo.
for /d %%l in ( %TEMP%\levain\levain-* ) do (
set levainDir=%%l
)
if "a%levainDir%" == "a" (
echo.
echo No new version found
exit /b 1
)
START /max "Levain Upgrade" CMD /c %levainDir%\levain.cmd --levainHome=%myPath%\.. --levain-upgrade %*
exit /b 0