26 lines
No EOL
809 B
PowerShell
26 lines
No EOL
809 B
PowerShell
param(
|
|
[string]$LibDir = (Join-Path $PSScriptRoot "..\www\WEB-INF\lib"),
|
|
[string]$OutputDir = (Join-Path $PSScriptRoot "..\decompiled-libs\www")
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
$jdCli = Get-Command jd-cli -ErrorAction Stop
|
|
$resolvedLibDir = (Resolve-Path $LibDir).Path
|
|
|
|
New-Item -ItemType Directory -Force -Path $OutputDir | Out-Null
|
|
|
|
$targets = Get-ChildItem -Path $resolvedLibDir -Filter '*.jar' |
|
|
Where-Object {
|
|
$_.Name -match '^acxent-.*\.jar$' -or $_.Name -match '^cli-rus-.*\.jar$'
|
|
}
|
|
|
|
if (-not $targets) {
|
|
throw 'No acxent or cli-rus jars found under www/WEB-INF/lib.'
|
|
}
|
|
|
|
foreach ($jar in $targets) {
|
|
$targetDir = Join-Path $OutputDir $jar.BaseName
|
|
New-Item -ItemType Directory -Force -Path $targetDir | Out-Null
|
|
& $jdCli.Source -od $targetDir $jar.FullName
|
|
} |