# Setup script for shishir0x/GoogleUnlimited on Windows (PowerShell), from https://gitmanual.com/shishir0x/GoogleUnlimited # Read it before you run it: the commands come from the repo's own README and files. # Run: powershell -ExecutionPolicy Bypass -File .\setup.ps1 $ErrorActionPreference = "Stop" function Write-Step($t) { Write-Host "`n==> $t" -ForegroundColor Cyan } # Windows ships a python that only opens the Microsoft Store; it doesn't count. function Have($c) { $cmd = Get-Command $c -ErrorAction SilentlyContinue; [bool]$cmd -and $cmd.Source -notlike '*\WindowsApps\*' } # New installs change PATH; pick it up without opening a new window. function Update-Path { $env:Path = [Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [Environment]::GetEnvironmentVariable("Path", "User") } # Stop when a program fails, like bash's set -e. Dot-sourced, so cd and venv activation carry on to the next step. function Invoke-Step([scriptblock]$Block) { $global:LASTEXITCODE = 0; . $Block; if ($LASTEXITCODE) { throw "Failed with exit code $LASTEXITCODE" } } Write-Step '1/2 Clone the repository' if (-not (Test-Path 'GoogleUnlimited')) { Invoke-Step { git clone https://github.com/shishir0x/GoogleUnlimited.git } } Set-Location 'GoogleUnlimited' Write-Step '2/2 Follow the README: Quick Start' # Run these in Git Bash (installed with Git) or WSL — not PowerShell. Do the README instructions above first. Invoke-Step { GoogleUnlimited.bat watch } # (needs Git Bash or WSL on Windows) chmod +x google-unlimited.sh # (needs Git Bash or WSL on Windows) ./google-unlimited.sh setup # (needs Git Bash or WSL on Windows) ./google-unlimited.sh creds add # (needs Git Bash or WSL on Windows) ./google-unlimited.sh watch # (needs Git Bash or WSL on Windows) chmod +x google-unlimited.sh # (needs Git Bash or WSL on Windows) ./google-unlimited.sh setup # (needs Git Bash or WSL on Windows) ./google-unlimited.sh creds add # (fill in your own values, then run it) echo "" | ./google-unlimited.sh creds add - # (needs Git Bash or WSL on Windows) ./google-unlimited.sh watch Write-Host 'Set up shishir0x/GoogleUnlimited.' Write-Host 'Compare yours with the README''s “Platform Requirements” list above before installing anything.' Write-Host 'Manual: https://gitmanual.com/shishir0x/GoogleUnlimited'