Skip to content

Commit

Permalink
add a function for parsing the string output of an archive list
Browse files Browse the repository at this point in the history
  • Loading branch information
RangerRick committed Apr 3, 2023
1 parent 96e52a5 commit b629b91
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mw5-sync.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ function Get-Mod-Info-From-File {
}
}

function Get-Mod-Info-Files-From-List {
param(
[Parameter(ValueFromPipeline=$true)]
$_archive_output
)

return $_archive_output -split '\r?\n' | Where-Object { $_ -match "^[^\\/]+[\\/]mod.json" } | ForEach-Object { $_.replace("Path = ", "") };
}

function Get-Mod-Info-From-Archive {
param( $_archive_file )

Expand Down

0 comments on commit b629b91

Please sign in to comment.