Last active
January 13, 2026 14:01
-
-
Save WindyNova/9cb52c565bd0e2e442a4fb7b260d853e to your computer and use it in GitHub Desktop.
Install Scoop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 设置 Scoop 仓库的镜像 | |
| $env:SCOOP_REPO = 'https://gh.llkk.cc/https://github.com/ScoopInstaller/Scoop.git' | |
| $env:SCOOP_MAIN_BUCKET_REPO = 'https://gh.llkk.cc/https://github.com/ScoopInstaller/Main.git' | |
| Invoke-WebRequest -useb https://raw.githubusercontent.com/ScoopInstaller/install/master/install.ps1 | Invoke-Expression | |
| scoop bucket list | |
| scoop install git | |
| scoop update | |
| scoop alias add upgrade "scoop update *; scoop update * -g" | |
| # If you lost 'main' bucket and does not have Git | |
| # Use these: | |
| # Invoke-WebRequest -Uri "https://github.com/ScoopInstaller/Main/archive/master.zip" -OutFile "$env:USERPROFILE\main.zip" | |
| # $zipFile = "$env:USERPROFILE\main.zip" | |
| # $tmpDir = "$env:USERPROFILE\main_tmp" | |
| # $mainDir = "$env:USERPROFILE\scoop\buckets\main" | |
| # Expand-Archive $zipFile $tmpDir -Force | |
| # $innerDir = Get-ChildItem $tmpDir | Where-Object { $_.PSIsContainer } | Select-Object -First 1 | |
| # Move-Item "$($innerDir.FullName)\*" $mainDir -Force | |
| # Remove-Item $tmpDir -Recurse -Force | |
| # Remove-Item $zipFile -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment