| |
| $IsElevated = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()). |
| IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) |
|
|
| |
| if (Get-Command scoop -ErrorAction SilentlyContinue) { |
| Write-Host "Scoop is already installed. Skipping installation." |
| } else { |
| Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force |
| if ($IsElevated) { |
| |
| Invoke-Expression "& {$(Invoke-RestMethod get.scoop.sh)} -RunAsAdmin" |
| } else { |
| |
| Invoke-WebRequest -useb get.scoop.sh | Invoke-Expression |
| } |
| } |
|
|
| scoop install git uv |
| if (Test-Path -LiteralPath "./web.py") { |
| |
| } |
| elseif (Test-Path -LiteralPath "./gcli2api/web.py") { |
| Set-Location ./gcli2api |
| } |
| else { |
| git clone https://github.com/su-kaka/gcli2api.git |
| Set-Location ./gcli2api |
| } |
| |
| $env:UV_VENV_CLEAR = "1" |
| uv venv --relocatable |
| uv sync |
| .venv/Scripts/activate.ps1 |
| python web.py |