Minor syntax improvements
This commit is contained in:
1 parent
c213bae01b
commit
06b0b2088c
1 file changed
+17
-15
+17
-15
@@ -2,32 +2,34 @@
|
|||||||
cls
|
cls
|
||||||
set dirpath=%~dp0
|
set dirpath=%~dp0
|
||||||
if "%dirpath:~-1%" == "\" set dirpath=%dirpath:~0,-1%
|
if "%dirpath:~-1%" == "\" set dirpath=%dirpath:~0,-1%
|
||||||
|
|
||||||
git --version > nul
|
git --version > nul
|
||||||
if %errorlevel% NEQ 0 goto NOGIT
|
if %errorlevel% NEQ 0 (
|
||||||
|
echo No git executable found in PATH!
|
||||||
|
echo:
|
||||||
|
pause
|
||||||
|
exit
|
||||||
|
)
|
||||||
|
|
||||||
if not exist "%dirpath%\env" (
|
if not exist "%dirpath%\env" (
|
||||||
echo:
|
echo:
|
||||||
echo Creating the env folder...
|
echo Creating the env folder...
|
||||||
python -m venv "%dirpath%\env"
|
python -m venv "%dirpath%\env"
|
||||||
if %errorlevel% NEQ 0 goto NOPYTHON
|
if %errorlevel% NEQ 0 (
|
||||||
|
echo:
|
||||||
|
echo No python executable found in PATH!
|
||||||
|
echo:
|
||||||
|
pause
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
echo:
|
echo:
|
||||||
echo Installing requirements.txt...
|
echo Installing requirements.txt...
|
||||||
"%dirpath%\env\scripts\python" -m pip install -U pip
|
"%dirpath%\env\scripts\python" -m pip install -U pip
|
||||||
"%dirpath%\env\scripts\pip" install wheel
|
"%dirpath%\env\scripts\pip" install wheel
|
||||||
"%dirpath%\env\scripts\pip" install -r "%dirpath%\requirements.txt"
|
"%dirpath%\env\scripts\pip" install -r "%dirpath%\requirements.txt"
|
||||||
goto DONE
|
|
||||||
:NOPYTHON
|
|
||||||
echo:
|
|
||||||
echo No python executable found in path!
|
|
||||||
pause
|
|
||||||
goto END
|
|
||||||
:NOGIT
|
|
||||||
echo:
|
|
||||||
echo No git executable found in path!
|
|
||||||
pause
|
|
||||||
goto END
|
|
||||||
:DONE
|
|
||||||
echo:
|
echo:
|
||||||
echo All done!
|
echo All done!
|
||||||
|
echo:
|
||||||
pause
|
pause
|
||||||
:END
|
|
||||||
Reference in new issue
Block a user