Adds list-import tooling, expands romhack-import for PC variants and patch batches, and syncs catalog with 2026-06-23 valhalla placements (Vanguard, Xenoverse, GBA patches, Infinity 3.3.1).
91 lines
3.4 KiB
PowerShell
91 lines
3.4 KiB
PowerShell
# Push Downloads batch to valhalla for romhack import.
|
|
# Primary Windows builds + alternate platform variants (Linux/macOS/Joiplay/Android).
|
|
$ErrorActionPreference = "Continue"
|
|
$dl = Join-Path $env:USERPROFILE "Downloads"
|
|
$remote = "valhalla:/storage1/igir/romhacks/incoming/downloads-batch"
|
|
|
|
$files = @(
|
|
# --- PC fan-games (Windows primary) ---
|
|
"Alchemist.rar",
|
|
"Concealed 2.1.rar",
|
|
"Pokemon Consonancia 1.2.rar",
|
|
"Pokemon Eon Guardians.zip",
|
|
"Pokemon Fire Ash 3.4.zip",
|
|
"FT EX.zip",
|
|
"Pokemon HGSS Sevii Islands - Final 1.0.zip",
|
|
"Pokemon Hero Legacy 3.0.7.zip",
|
|
"Itinerant v7.9.4.zip",
|
|
"PKMN Jam Festival v1.4.rar",
|
|
"Legends of the Arena 1.4.1.zip",
|
|
"Pokemon Nightmare 1.3.0.zip",
|
|
"Poketale.zip",
|
|
"Vanguard 3.0.12.7z",
|
|
"Pokemon Awakening ENG.rar",
|
|
"Pokemon Bizarre ENGLISH.zip",
|
|
"ReminiscenciaV2_3.zip",
|
|
"Pokemon Uranium 1.2.5.zip",
|
|
"Pokemon Tectonic 3.4.1.zip",
|
|
"Pokemon Shattered Light.zip",
|
|
"Relict V1.2.1.zip",
|
|
"Xenoverse-Source-main.zip",
|
|
"PokemonPrismeInstaller.exe",
|
|
"infinitefusion-e18-6.7.zip",
|
|
"InfiniteFusion.zip",
|
|
"Reborn-19.5.0-windows.zip",
|
|
"Rejuvenation-13.5.0-windows.zip",
|
|
# --- Alternate platform builds (separate RomM entries) ---
|
|
"Pokemon Hero Legacy 3.0.7 Mac.dmg",
|
|
"Pokemon Hero Legacy 3.0.7 Joiplay.zip",
|
|
"Itinerant v7.9.4 (Android).zip",
|
|
"Reborn-19.5.0-linux.zip",
|
|
"Reborn-19.5.0-macos.zip",
|
|
"Reborn-19.5.0-joiplay.jgp",
|
|
"Rejuvenation-13.5.0-linux.zip",
|
|
"Rejuvenation-13.5.0-macos.zip",
|
|
"Rejuvenation - Where Love Lies.zip",
|
|
# --- ROMs / patches ---
|
|
"LightPlatinumV022.zip",
|
|
"Azure Horizons True Continued Beta 2.ips",
|
|
"Pokemon Vega Fairy Edition EX 1.4.ups",
|
|
"Pokemon - Fire Red (J) (V1.0).gba",
|
|
"Sienna Complete Version.ips",
|
|
"EmeraldSeaglass_v3.0 (1).ips",
|
|
"emerald_cross_2_0_5.bps",
|
|
"re_rebalanced_version_2.2.8.bps",
|
|
"recharged_emerald_version_2.2.8.bps"
|
|
)
|
|
|
|
$extras = @(
|
|
(Get-ChildItem $dl -Filter "*Mega Adventure*" -File | Select-Object -First 1).FullName,
|
|
(Get-ChildItem $dl -Filter "*Abstract*" -File | Select-Object -First 1).FullName,
|
|
(Get-ChildItem $dl -Filter "*Odyssey COMPLETE*" -File | Select-Object -First 1).FullName
|
|
) | Where-Object { $_ }
|
|
|
|
ssh valhalla "mkdir -p /storage1/igir/romhacks/incoming/downloads-batch"
|
|
|
|
$queued = @()
|
|
foreach ($f in $files) {
|
|
$p = Join-Path $dl $f
|
|
if (Test-Path $p) { $queued += $p } else { Write-Warning "SKIP missing: $f" }
|
|
}
|
|
foreach ($p in $extras) {
|
|
if ($p -and (Test-Path $p) -and $queued -notcontains $p) { $queued += $p }
|
|
}
|
|
|
|
# Skip files already on valhalla (resume-friendly)
|
|
$remoteList = ssh valhalla "ls -1 /storage1/igir/romhacks/incoming/downloads-batch/ 2>/dev/null" 2>$null
|
|
$remoteSet = [System.Collections.Generic.HashSet[string]]::new([string[]]$remoteList)
|
|
$todo = @($queued | Where-Object { -not $remoteSet.Contains((Split-Path $_ -Leaf)) })
|
|
|
|
$total = ($todo | ForEach-Object { (Get-Item $_).Length } | Measure-Object -Sum).Sum
|
|
Write-Host ("Uploading {0} files ({1:N1} GB); {2} already on server" -f $todo.Count, ($total/1GB), ($queued.Count - $todo.Count))
|
|
|
|
$ok = 0; $fail = 0
|
|
foreach ($p in $todo) {
|
|
$name = Split-Path $p -Leaf
|
|
Write-Host " -> $name"
|
|
scp $p "${remote}/"
|
|
if ($LASTEXITCODE -eq 0) { $ok++ } else { $fail++; Write-Warning "FAILED: $name" }
|
|
}
|
|
Write-Host "Upload complete: $ok ok, $fail failed, $($queued.Count - $todo.Count) skipped (already present)"
|