handle_exclude_lists.ps1 646 B

1234567891011121314151617181920
  1. # Load and parse the text file with the folders to exclude from the AppData directory
  2. function parse_appdata_exclude() {
  3. $exclude_list = Get-Content (Join-Path $PSScriptRoot exclude_from_appdata.list)
  4. $exclude = @()
  5. foreach ($line in $exclude_list.Split("`n"))
  6. {
  7. $exclude += '-xr"!' + $line.Trim() + '"'
  8. }
  9. return $exclude
  10. }
  11. function parse_sync_exclude() {
  12. $exclude_list = Get-Content (Join-Path $PSScriptRoot exclude_from_sync.list)
  13. $exclude = @()
  14. foreach ($line in $exclude_list.Split("`n"))
  15. {
  16. $exclude += $line.Trim()
  17. }
  18. return ("| " + ($exclude -join ";"))
  19. }