Skip to content

Instantly share code, notes, and snippets.

@theorium-0
Created May 2, 2026 01:37
Show Gist options
  • Select an option

  • Save theorium-0/1c05f1dcc1b5650c607ab058c2d29c44 to your computer and use it in GitHub Desktop.

Select an option

Save theorium-0/1c05f1dcc1b5650c607ab058c2d29c44 to your computer and use it in GitHub Desktop.
powershell -ExecutionPolicy Bypass -File RaspAPRemix.ps1
# ╔══════════════════════════════════════════════════════╗
# ║ MainsailOS + RaspAP Hybrid Image Builder ║
# ║ Aesthetic PowerShell Launcher ║
# ╚══════════════════════════════════════════════════════╝
# Ensure script runs from its own directory
Set-Location -Path (Split-Path $MyInvocation.MyCommand.Path)
# ASCII banner
$banner = @"
╔══════════════════════════════════════════════════════╗
║ HYBRID IMAGE BUILDER — MAINSAILOS + RASPAP (WSL) ║
╠══════════════════════════════════════════════════════╣
║ Author: Ridley
║ Mode: Fully Automated
║ Target: mainsail-raspap-hybrid.img
╚══════════════════════════════════════════════════════╝
"@
Write-Host $banner -ForegroundColor Cyan
# Check WSL
if (-not (wsl.exe -l -q)) {
Write-Host "ERROR: WSL is not installed." -ForegroundColor Red
Write-Host "Install with: wsl --install"
exit 1
}
# Check Ubuntu exists
$distros = wsl.exe -l -q
if ($distros -notcontains "Ubuntu") {
Write-Host "ERROR: Ubuntu WSL not found." -ForegroundColor Red
Write-Host "Install with: wsl --install -d Ubuntu"
exit 1
}
# Confirm script exists
$scriptPath = "/home/$env:USERNAME/build-hybrid.sh"
$scriptWinPath = "C:\Users\$env:USERNAME\build-hybrid.sh"
if (-not (Test-Path $scriptWinPath)) {
Write-Host "ERROR: build-hybrid.sh not found at:" -ForegroundColor Red
Write-Host " $scriptWinPath"
exit 1
}
# Make executable
wsl chmod +x $scriptPath
# Run builder
Write-Host "Launching hybrid builder inside WSL..." -ForegroundColor Yellow
Write-Host ""
wsl sudo $scriptPath 2>&1 | Tee-Object -FilePath "HybridBuild.log"
Write-Host ""
Write-Host "══════════════════════════════════════════════════════" -ForegroundColor Cyan
Write-Host " Build complete. Log saved to HybridBuild.log" -ForegroundColor Green
Write-Host " Output image located in:" -ForegroundColor Green
Write-Host " C:\Users\ridle\Downloads\ISO\mainsail-raspap-hybrid.img" -ForegroundColor White
Write-Host "══════════════════════════════════════════════════════" -ForegroundColor Cyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment