-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
33 lines (27 loc) · 887 Bytes
/
Copy pathrun.bat
File metadata and controls
33 lines (27 loc) · 887 Bytes
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
@echo off
:: ============================================================================
:: DataBuilder - Windows double-click launcher.
::
:: Activates .venv\ and runs `python -m dataset_sorter`. Designed to be
:: double-clicked from Explorer.
:: ============================================================================
title DataBuilder
:: Cd into the directory this .bat file lives in (Explorer launches with
:: cwd = something else, depending on the user's shortcut).
cd /d "%~dp0"
if not exist ".venv\Scripts\activate.bat" (
echo.
echo No .venv\ here -- double-click install.bat first.
echo.
pause
exit /b 1
)
:: Silent auto-update; ignore failures (offline).
git pull --ff-only >nul 2>&1
call .venv\Scripts\activate.bat
python -m dataset_sorter
if %errorlevel% neq 0 (
echo.
echo DataBuilder exited with error code %errorlevel%.
pause
)