Skip to content

Commit

Permalink
Minor syntax improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
DevilXD committed Dec 6, 2023
1 parent c213bae commit 06b0b20
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions setup_env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,34 @@
cls
set dirpath=%~dp0
if "%dirpath:~-1%" == "\" set dirpath=%dirpath:~0,-1%

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" (
echo:
echo Creating the env folder...
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 Installing requirements.txt...
"%dirpath%\env\scripts\python" -m pip install -U pip
"%dirpath%\env\scripts\pip" install wheel
"%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 All done!
echo:
pause
:END

0 comments on commit 06b0b20

Please sign in to comment.