44 lines
797 B
Batchfile
44 lines
797 B
Batchfile
@echo off
|
||
setlocal EnableDelayedExpansion
|
||
|
||
set "RESET=[0m"
|
||
set "BLUE=[1;34m"
|
||
set "GREEN=[1;32m"
|
||
set "RED=[1;31m"
|
||
set "YELLOW=[1;33m"
|
||
set "WHITE=[1;37m"
|
||
|
||
echo %BLUE%Get Requirements%RESET%
|
||
|
||
@REM is python installed?
|
||
python --version >nul 2>&1
|
||
if %errorlevel% neq 0 (
|
||
echo "python not installed"
|
||
winget install -e --id Python.Python
|
||
echo %RED%Try launching this script again%RESET%
|
||
pause
|
||
exit /b 1
|
||
)
|
||
echo %GREEN%Python installed%RESET%
|
||
|
||
@REM is pip installed?
|
||
pip --version >nul 2>&1
|
||
if %errorlevel% neq 0 (
|
||
echo "pip not installed"
|
||
|
||
|
||
exit /b 1
|
||
)
|
||
echo %GREEN%Pip installed%RESET%
|
||
|
||
@REM check if requirements.txt exists
|
||
if not exist "requirements.txt" (
|
||
echo "requirements.txt not found"
|
||
exit /b 1
|
||
)
|
||
|
||
set "file=requirements.txt"
|
||
|
||
pip install -r %file%
|
||
|
||
pause |