Skip to content

Commit 101799a

Browse files
committed
Add GitHub Pages install script for Windows
- Create docs/windows file to serve as GitHub Pages endpoint - This script downloads and executes the actual installer from server-files/install.ps1 - Fixes the 'irm https://litiantian123-code.github.io/agbcloud-cli/windows' command - Users can now install AgbCloud CLI using the one-liner command
1 parent f79a880 commit 101799a

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

docs/windows

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# PowerShell script to download and install AgbCloud CLI
2+
# This script downloads the actual installer from the repository
3+
4+
$ErrorActionPreference = "Stop"
5+
6+
Write-Host "AgbCloud CLI Windows Installer" -ForegroundColor Green
7+
Write-Host "==============================" -ForegroundColor Green
8+
Write-Host ""
9+
10+
# Download the actual install script from the repository
11+
$installScriptUrl = "https://raw.githubusercontent.com/litiantian123-code/agbcloud-cli/main/server-files/install.ps1"
12+
$tempPath = "$env:TEMP\agbcloud-install.ps1"
13+
14+
try {
15+
Write-Host "[INFO] Downloading installer script..." -ForegroundColor Yellow
16+
Invoke-WebRequest -Uri $installScriptUrl -OutFile $tempPath -UseBasicParsing
17+
18+
Write-Host "[INFO] Running installer..." -ForegroundColor Yellow
19+
Write-Host ""
20+
21+
# Execute the downloaded script
22+
& PowerShell -ExecutionPolicy Bypass -File $tempPath
23+
24+
# Clean up
25+
Remove-Item $tempPath -ErrorAction SilentlyContinue
26+
27+
} catch {
28+
Write-Error "Failed to download or execute installer: $_"
29+
Write-Host ""
30+
Write-Host "Manual installation options:" -ForegroundColor Yellow
31+
Write-Host "1. Download install.ps1 directly from:" -ForegroundColor White
32+
Write-Host " https://raw.githubusercontent.com/litiantian123-code/agbcloud-cli/main/server-files/install.ps1" -ForegroundColor Cyan
33+
Write-Host ""
34+
Write-Host "2. Or visit the releases page:" -ForegroundColor White
35+
Write-Host " https://github.com/litiantian123-code/agbcloud-cli/releases" -ForegroundColor Cyan
36+
exit 1
37+
}

0 commit comments

Comments
 (0)