-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathuninstall.bat
43 lines (35 loc) · 1.11 KB
/
uninstall.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@echo off
SETLOCAL
SET ENV_NAME=data-curation
SET PATHFILE=dataset_curation_path.txt
echo Starting uninstallation of the '%ENV_NAME%' environment.
REM Check if conda is installed
IF EXIST "%UserProfile%\Miniconda3\Scripts\conda.exe" (
echo Conda is installed.
) ELSE (
echo Conda is not installed. Nothing to uninstall.
GOTO :EOF
)
REM Deactivate any active conda environment
call conda deactivate
REM Check if the environment exists
call conda env list | findstr /C:"%ENV_NAME%" >nul
IF %ERRORLEVEL% EQU 0 (
echo Removing conda environment '%ENV_NAME%'...
call conda env remove -n "%ENV_NAME%"
) ELSE (
echo Conda environment '%ENV_NAME%' does not exist.
)
REM Remove the Dataset-Curation-Tool directory if it exists
IF EXIST "%PATHFILE%" (
set /p STORED_PATH=<"%PATHFILE%"
IF EXIST "%STORED_PATH%" (
echo Removing 'Dataset-Curation-Tool' directory at '%STORED_PATH%'...
rmdir /S /Q "%STORED_PATH%"
) ELSE (
echo Directory '%STORED_PATH%' does not exist.
)
del "%PATHFILE%"
)
echo Uninstallation complete.
ENDLOCAL