Files
syncthing-android/scripts/res-string-remover.ps1
Catfriend1 44f0ae96b2 Revert bind_active_network due to bug (#1394)
* Revert bind_active_network due to bug

ref: PR #914
2025-05-09 01:04:23 +02:00

16 lines
524 B
PowerShell

#
$stringToDelete = Read-Host "Please enter string to remove containing rows in xml files"
$basePath = ($PSScriptRoot + "\..\app\src\main\res")
#
Get-ChildItem -Path $basePath -Recurse -Filter *.xml | ForEach-Object {
$file = $_.FullName
$lines = Get-Content $file
$filteredLines = $lines | Where-Object { $_ -notmatch [regex]::Escape($stringToDelete) }
if ($lines.Count -ne $filteredLines.Count) {
Set-Content -Path $file -Value $filteredLines
Write-Host "Processed: $file"
}
}
#
Exit 0