-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-upgrade-scoop.ps1
More file actions
31 lines (24 loc) · 924 Bytes
/
install-upgrade-scoop.ps1
File metadata and controls
31 lines (24 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$scoopPath = Get-Command scoop -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source
if (-not $scoopPath) {
Write-Host "Scoop is not installed..." -ForegroundColor DarkYellow
$installChoice = Read-Host "Do you want to install Scoop? (y/n)"
if ($installChoice -ieq 'y') {
Write-Host "Installing Scoop..." -ForegroundColor DarkYellow
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod get.scoop.sh | Invoke-Expression
}
else {
Write-Host "Skipping Scoop installation..." -ForegroundColor DarkYellow
}
}
else {
Write-Host "Scoop is already installed..." -ForegroundColor DarkYellow
$upgradeChoice = Read-Host "Do you want to upgrade Scoop? (y/n)"
if ($upgradeChoice -ieq 'y') {
Write-Host "Upgrading Scoop..." -ForegroundColor DarkYellow
scoop update
}
else {
Write-Host "Skipping Scoop upgrade..." -ForegroundColor DarkYellow
}
}