еуые 4

This commit is contained in:
Alexey Barabanov
2025-11-05 17:47:52 +03:00
parent f0ab797a83
commit bbf4e2dd4a

View File

@@ -32,7 +32,7 @@ if !errorlevel! equ 0 (
echo WARNING: Backup failed
)
powershell -Command "$content = [System.IO.File]::ReadAllText('%FILE%'); $content = $content -replace 'http[s]?://[^\s\<\"]+', '%NEWURL%'; [System.IO.File]::WriteAllText('%FILE%', $content, [System.Text.Encoding]::UTF8); Write-Host 'SUCCESS: Replacement completed'"
powershell -Command "$content = [System.IO.File]::ReadAllText('%FILE%'); $pattern = '<url>http[s]?://[^/<\"]+(/[^<\"]*)?</url>'; $content = $content -replace $pattern, '<url>%NEWURL%$1</url>'; [System.IO.File]::WriteAllText('%FILE%', $content, [System.Text.Encoding]::UTF8); Write-Host 'SUCCESS: Replacement completed'"
if errorlevel 1 (
echo ERROR: PowerShell command failed