add more scripts to automatically update:

- last updated elx file
- all elx files
This commit is contained in:
2026-05-26 13:36:48 +02:00
parent 60fc9e8d07
commit 0fe463338a
6 changed files with 97 additions and 64 deletions
+35
View File
@@ -0,0 +1,35 @@
function Save-ElxInternals {
param(
[ValidateScript({ Test-Path $_ -PathType Leaf })][Parameter(Mandatory)]$ModulePath
)
Write-Host "Switching to ELX Tools directory..."
$extractElxToolsScriptPath = Join-Path $PSScriptRoot "../tools/extract-elx/"
Push-Location -StackName ElxTools $extractElxToolsScriptPath
Write-Host "Installing Node.js dependencies for the ELX Tools..."
# Install Node.js dependencies for the ELX Tools
& npm install
if ($LASTEXITCODE -ne 0) {
Write-Error "npm install failed with exit code $LASTEXITCODE."
exit 1
}
Write-Host "Node.js dependencies installed successfully!" -ForegroundColor Cyan
Write-Host "Executing ELX extraction..."
& node "extract-elx.js" $ModulePath --clean
if ($LASTEXITCODE -ne 0) {
Write-Error "ELX extraction failed with exit code $LASTEXITCODE."
exit 1
}
Write-Host "ELX extraction completed successfully!" -ForegroundColor Green
Write-Host "Switching back to original directory..."
Pop-Location -StackName ElxTools
}
Export-ModuleMember -Function Save-ElxInternals