update keeps delivery components (robocopy code over kit instead of wiping app); fix exceptions copy path to setup root

This commit is contained in:
Sadmin committed 2026-11-02 19:29:54 +03:00
1 parent 35ca06dd6b
commit 55bf9cd21e
1 file changed
+12 -3
+12 -3
View File
@@ -8,9 +8,18 @@ echo Everything is installed into the subfolder "app"
echo ============================================================
if /i not "%~1"=="update" goto :step0
echo UPDATE: re-downloading project code, installed components stay...
if exist app rmdir /s /q app
echo UPDATE: downloading fresh code, installed components inside delivery stay...
if exist repo.zip del /q repo.zip
curl -L -f --retry 3 -o repo.zip https://gitea.viktot14.com/Sadmin/docchecker/archive/main.zip || goto :err
tar -xf repo.zip -C app || goto :err
for /d %%D in (app\docchecker-*) do (
robocopy "%%D" "app\docchecker" /E /NFL /NDL /NJH /NJS /NP
rmdir /s /q "%%D"
)
if not exist app\docchecker\app.py goto :err
if exist app\docchecker\exceptions.txt if not exist "%~dp0exceptions.txt" copy /y app\docchecker\exceptions.txt "%~dp0exceptions.txt" >nul
del repo.zip
goto :app_ready
:step0
if exist app\docchecker\app.py goto :app_ready
echo [1/6] Downloading project archive from Gitea...
@@ -20,7 +29,7 @@ if exist app\docchecker rmdir /s /q app\docchecker
tar -xf repo.zip -C app || goto :err
for /d %%D in (app\docchecker*) do ren "%%D" "docchecker"
if not exist app\docchecker\app.py goto :err
if exist app\docchecker\exceptions.txt if not exist ..\exceptions.txt copy /y app\docchecker\exceptions.txt ..\exceptions.txt >nul
if exist app\docchecker\exceptions.txt if not exist "%~dp0exceptions.txt" copy /y app\docchecker\exceptions.txt "%~dp0exceptions.txt" >nul
del repo.zip
:app_ready
cd /d app\docchecker || goto :err