Merge branch 'main' into 'main'

patch.bat fix to ensure PowerShell commands will be executed in the current directory

See merge request dazed-translations/ai-the-devil-and-the-curse-of-lust!1
This commit is contained in:
DazedAnon 2025-02-04 04:38:12 +00:00
commit 511aa1e69e

View file

@ -80,7 +80,7 @@ exit /b
:download_extract
REM Download zip file
echo "Downloading latest patch..."
!_my_shell! -Command "Invoke-WebRequest -Uri 'https://gitgud.io/%username%/%repo%/-/archive/%branch%/%repo%-%branch%.zip' -OutFile 'repo.zip'"
!_my_shell! -Command "Set-Location -LiteralPath '%CD%'; Invoke-WebRequest -Uri 'https://gitgud.io/%username%/%repo%/-/archive/%branch%/%repo%-%branch%.zip' -OutFile 'repo.zip'"
if !errorlevel! neq 0 (
pause
exit /b
@ -88,7 +88,7 @@ if !errorlevel! neq 0 (
REM Extract contents, overwriting conflicts
echo "Extracting..."
!_my_shell! -Command "Expand-Archive -Path '.\repo.zip' -DestinationPath '.' -Force"
!_my_shell! -Command "Set-Location -LiteralPath '%CD%'; Expand-Archive -Path '.\repo.zip' -DestinationPath '.' -Force"
echo "Applying patch..."
xcopy /s /e /y "%repo%-%branch%\*" "."