File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ @ echo off
2
+ rem
3
+ rem Runs the blurb tool. If necessary, will install Python and/or blurb.
4
+ rem
5
+ rem Pass "--update"/"-U" as the first argument to update blurb.
6
+ rem
7
+
8
+ call " %~dp0 find_python.bat" %PYTHON%
9
+ if ERRORLEVEL 1 (echo Cannot locate python.exe on PATH or as PYTHON variable & exit /b 3)
10
+
11
+ if " %1 " EQU " --update" (%PYTHON% -m pip install -U blurb && shift)
12
+ if " %1 " EQU " -U" (%PYTHON% -m pip install -U blurb && shift)
13
+
14
+ %PYTHON% -m blurb %1 %2 %3 %4 %5 %6 %7 %8 %9
15
+ if ERRORLEVEL 1 goto :install_and_retry
16
+ exit /B 0
17
+
18
+ :install_and_retry
19
+ rem Before reporting the error, make sure that blurb is actually installed.
20
+ rem If not, install it first and try again.
21
+ set _ERR = %ERRORLEVEL%
22
+ %PYTHON% -c " import blurb"
23
+ if NOT ERRORLEVEL 1 exit /B %_ERR%
24
+ echo Installing blurb...
25
+ %PYTHON% -m pip install blurb
26
+ if ERRORLEVEL 1 exit /B %ERRORLEVEL%
27
+ %PYTHON% -m blurb %*
28
+ exit /B
You can’t perform that action at this time.
0 commit comments