Fix reviews
This commit is contained in:
1 parent
7473aaebc5
commit
f8fa68b5b6
5 files changed
+202
-218
No files matched your search
Regular → Executable
+46
-54
@@ -1,54 +1,46 @@
|
||||
@echo off
|
||||
|
||||
REM Get the directory path of the script
|
||||
set "dirpath=%~dp0"
|
||||
if "%dirpath:~-1%" == "\" set "dirpath=%dirpath:~0,-1%"
|
||||
|
||||
REM Check if git is installed
|
||||
git --version > nul 2>&1
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo No git executable found in PATH!
|
||||
echo:
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Create the virtual environment if it doesn't exist
|
||||
if not exist "%dirpath%\env" (
|
||||
echo:
|
||||
echo Creating the env folder...
|
||||
python -m venv "%dirpath%\env"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
echo No python executable found in PATH or failed to create virtual environment!
|
||||
echo:
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
REM Activate the virtual environment and install requirements
|
||||
echo:
|
||||
echo Installing requirements.txt...
|
||||
"%dirpath%\env\scripts\python" -m pip install -U pip
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo Failed to upgrade pip.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
"%dirpath%\env\scripts\pip" install wheel
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo Failed to install wheel.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
"%dirpath%\env\scripts\pip" install -r "%dirpath%\requirements.txt"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo Failed to install requirements.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo:
|
||||
echo All done!
|
||||
echo:
|
||||
pause
|
||||
@echo off
|
||||
|
||||
REM Get the directory path of the script
|
||||
set "dirpath=%~dp0"
|
||||
if "%dirpath:~-1%" == "\" set "dirpath=%dirpath:~0,-1%"
|
||||
|
||||
REM Check if git is installed
|
||||
git --version > nul 2>&1
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo No git executable found in PATH!
|
||||
echo:
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Create the virtual environment if it doesn't exist
|
||||
if not exist "%dirpath%\env" (
|
||||
echo:
|
||||
echo Creating the env folder...
|
||||
python -m venv "%dirpath%\env"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo:
|
||||
echo No python executable found in PATH or failed to create virtual environment!
|
||||
echo:
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
REM Activate the virtual environment and install requirements
|
||||
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"
|
||||
if %errorlevel% NEQ 0 (
|
||||
echo Failed to install requirements.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo:
|
||||
echo All done!
|
||||
echo:
|
||||
pause
|
||||
Reference in new issue
Block a user