mirror of
https://codefloe.com/Jonas8272/scoop-bucket.git
synced 2026-12-01 01:29:36 +00:00
Compare commits
8
Commits
921b8ec617
...
29257749bd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29257749bd | ||
|
|
487f7fb94c | ||
|
|
8515acf12e | ||
|
|
a37459a52e | ||
|
|
7471d2c1fc | ||
|
|
3242d41d57 | ||
|
|
ed16504cf5 | ||
|
|
ece0ef78ef |
No files matched your search
@@ -133,6 +133,38 @@ irm https://codefloe.com/Jonas8272/scoop-bucket/raw/branch/master/installations/
|
|||||||
|
|
||||||
> **Note:** This one is installed from the Microsoft Store through winget. The Store updates it, not `scoop update`.
|
> **Note:** This one is installed from the Microsoft Store through winget. The Store updates it, not `scoop update`.
|
||||||
|
|
||||||
|
## Installing Netflix
|
||||||
|
|
||||||
|
The Netflix app for Windows, for watching movies and TV shows.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
scoop install Jonas8272/netflix
|
||||||
|
```
|
||||||
|
|
||||||
|
Or set up everything and install it with one script:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
irm https://codefloe.com/Jonas8272/scoop-bucket/raw/branch/master/installations/install-netflix.ps1 | iex
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note:** This one is installed from the Microsoft Store through winget. The Store updates it, not `scoop update`.
|
||||||
|
|
||||||
|
## Installing Edge
|
||||||
|
|
||||||
|
The Microsoft Edge browser.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
scoop install Jonas8272/edge
|
||||||
|
```
|
||||||
|
|
||||||
|
Or set up everything and install it with one script:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
irm https://codefloe.com/Jonas8272/scoop-bucket/raw/branch/master/installations/install-edge.ps1 | iex
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Note:** This one is installed through winget. Edge is already built into Windows, so this usually just reports that it is installed. Edge updates itself, not `scoop update`.
|
||||||
|
|
||||||
## Updating
|
## Updating
|
||||||
|
|
||||||
Update Scoop and its bucket manifests:
|
Update Scoop and its bucket manifests:
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"version": "1.0",
|
||||||
|
"description": "Microsoft Edge browser (installed via winget; Edge updates itself)",
|
||||||
|
"homepage": "https://www.microsoft.com/edge",
|
||||||
|
"license": "Proprietary",
|
||||||
|
"url": "https://jonas8272.codeberg.page/blank/#/blank.html",
|
||||||
|
"installer": {
|
||||||
|
"script": "winget install --id Microsoft.Edge --source winget --accept-package-agreements --accept-source-agreements"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"version": "1.0",
|
||||||
|
"description": "Netflix: watch movies and TV shows (installed from the Microsoft Store via winget)",
|
||||||
|
"homepage": "https://apps.microsoft.com/detail/9WZDNCRFJ3TJ",
|
||||||
|
"license": "Proprietary",
|
||||||
|
"url": "https://jonas8272.codeberg.page/blank/#/blank.html",
|
||||||
|
"installer": {
|
||||||
|
"script": "winget install --id 9WZDNCRFJ3TJ --source msstore --accept-package-agreements --accept-source-agreements"
|
||||||
|
},
|
||||||
|
"uninstaller": {
|
||||||
|
"script": "winget uninstall --id 9WZDNCRFJ3TJ --source msstore"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,8 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
1. Installs Scoop if it is missing.
|
1. Installs Scoop if it is missing.
|
||||||
2. Installs git through Scoop if it is missing.
|
2. Installs git through Scoop if it is missing.
|
||||||
3. Adds the Jonas8272 bucket if it is not added yet.
|
3. Adds the Jonas8272 bucket if it is not added yet, or updates it if it is,
|
||||||
|
so newly added apps are picked up.
|
||||||
4. Installs every app found in the bucket, one by one. A failing app does
|
4. Installs every app found in the bucket, one by one. A failing app does
|
||||||
not stop the others, and a summary is printed at the end.
|
not stop the others, and a summary is printed at the end.
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
Skip these apps.
|
Skip these apps.
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
.\install-all.ps1
|
irm https://codefloe.com/Jonas8272/scoop-bucket/raw/branch/master/installations/install-all.ps1 | iex
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
.\install-all.ps1 -Exclude fxsound
|
.\install-all.ps1 -Exclude fxsound
|
||||||
@@ -29,8 +30,7 @@
|
|||||||
.\install-all.ps1 -Only mornye,socialstreamninja
|
.\install-all.ps1 -Only mornye,socialstreamninja
|
||||||
|
|
||||||
.NOTES
|
.NOTES
|
||||||
Run in a normal (non-admin) PowerShell window if Scoop is not installed yet,
|
Run in a normal (non-admin) PowerShell window if Scoop is not installed yet.
|
||||||
because Scoop's installer refuses to run elevated.
|
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
@@ -54,13 +54,20 @@ function Test-Admin {
|
|||||||
return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scoopRoot = if ($env:SCOOP) { $env:SCOOP } else { Join-Path $env:USERPROFILE 'scoop' }
|
||||||
|
|
||||||
# 1. Scoop -------------------------------------------------------------------
|
# 1. Scoop -------------------------------------------------------------------
|
||||||
if (-not (Test-Command 'scoop')) {
|
if (-not (Test-Command 'scoop')) {
|
||||||
Write-Host 'Scoop not found. Installing Scoop...' -ForegroundColor Cyan
|
Write-Host 'Scoop not found. Installing Scoop...' -ForegroundColor Cyan
|
||||||
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
|
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
|
||||||
Invoke-RestMethod -Uri 'https://get.scoop.sh' | Invoke-Expression
|
if (Test-Admin) {
|
||||||
|
Invoke-Expression "& {$(Invoke-RestMethod -Uri 'https://get.scoop.sh')} -RunAsAdmin"
|
||||||
|
} else {
|
||||||
|
Invoke-RestMethod -Uri 'https://get.scoop.sh' | Invoke-Expression
|
||||||
|
}
|
||||||
|
|
||||||
$env:PATH = "$env:USERPROFILE\scoop\shims;$env:PATH"
|
# Make scoop available in this session without reopening PowerShell
|
||||||
|
$env:PATH = "$scoopRoot\shims;$env:PATH"
|
||||||
|
|
||||||
if (-not (Test-Command 'scoop')) {
|
if (-not (Test-Command 'scoop')) {
|
||||||
throw 'Scoop was installed but is not on PATH. Open a new PowerShell window and run this script again.'
|
throw 'Scoop was installed but is not on PATH. Open a new PowerShell window and run this script again.'
|
||||||
@@ -69,12 +76,12 @@ if (-not (Test-Command 'scoop')) {
|
|||||||
Write-Host 'Scoop is already installed.' -ForegroundColor Green
|
Write-Host 'Scoop is already installed.' -ForegroundColor Green
|
||||||
}
|
}
|
||||||
|
|
||||||
# 2. git (needed to add buckets) ---------------------------------------------
|
# 2. git (needed to add buckets) ----------------------------------------------
|
||||||
if (-not (Test-Command 'git')) {
|
if (-not (Test-Command 'git')) {
|
||||||
Write-Host 'git not found. Installing git through Scoop...' -ForegroundColor Cyan
|
Write-Host 'git not found. Installing git through Scoop...' -ForegroundColor Cyan
|
||||||
scoop install git
|
scoop install git
|
||||||
if ($LASTEXITCODE -ne 0) { throw 'Failed to install git through Scoop.' }
|
if ($LASTEXITCODE -ne 0) { throw 'Failed to install git through Scoop.' }
|
||||||
$env:PATH = "$env:USERPROFILE\scoop\shims;$env:PATH"
|
$env:PATH = "$scoopRoot\shims;$env:PATH"
|
||||||
} else {
|
} else {
|
||||||
Write-Host 'git is already installed.' -ForegroundColor Green
|
Write-Host 'git is already installed.' -ForegroundColor Green
|
||||||
}
|
}
|
||||||
@@ -86,7 +93,8 @@ $existing = scoop bucket list | Where-Object {
|
|||||||
|
|
||||||
if ($existing) {
|
if ($existing) {
|
||||||
$BucketName = $existing.Name
|
$BucketName = $existing.Name
|
||||||
Write-Host "Bucket '$BucketName' is already added." -ForegroundColor Green
|
Write-Host "Bucket '$BucketName' is already added. Updating it..." -ForegroundColor Green
|
||||||
|
scoop update
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
||||||
scoop bucket add $BucketName $BucketUrl
|
scoop bucket add $BucketName $BucketUrl
|
||||||
@@ -94,13 +102,12 @@ if ($existing) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# 4. Find the apps in the bucket ----------------------------------------------
|
# 4. Find the apps in the bucket ----------------------------------------------
|
||||||
$root = if ($env:SCOOP) { $env:SCOOP } else { Join-Path $env:USERPROFILE 'scoop' }
|
$bucketDir = Join-Path $scoopRoot "buckets\$BucketName\bucket"
|
||||||
$bucketDir = Join-Path $root "buckets\$BucketName\bucket"
|
|
||||||
if (-not (Test-Path $bucketDir)) {
|
if (-not (Test-Path $bucketDir)) {
|
||||||
$bucketDir = Join-Path $root "buckets\$BucketName"
|
$bucketDir = Join-Path $scoopRoot "buckets\$BucketName"
|
||||||
}
|
}
|
||||||
if (-not (Test-Path $bucketDir)) {
|
if (-not (Test-Path $bucketDir)) {
|
||||||
throw "Could not find the bucket folder for '$BucketName' under $root."
|
throw "Could not find the bucket folder for '$BucketName' under $scoopRoot."
|
||||||
}
|
}
|
||||||
|
|
||||||
$manifests = Get-ChildItem -Path $bucketDir -Filter '*.json' -File | Sort-Object Name
|
$manifests = Get-ChildItem -Path $bucketDir -Filter '*.json' -File | Sort-Object Name
|
||||||
@@ -139,4 +146,4 @@ foreach ($m in $manifests) {
|
|||||||
|
|
||||||
Write-Host ''
|
Write-Host ''
|
||||||
Write-Host 'Summary' -ForegroundColor Green
|
Write-Host 'Summary' -ForegroundColor Green
|
||||||
$results | Format-Table -AutoSize
|
$results | Format-Table -AutoSize
|
||||||
@@ -75,7 +75,8 @@ $existing = scoop bucket list | Where-Object {
|
|||||||
|
|
||||||
if ($existing) {
|
if ($existing) {
|
||||||
$BucketName = $existing.Name
|
$BucketName = $existing.Name
|
||||||
Write-Host "Bucket '$BucketName' is already added." -ForegroundColor Green
|
Write-Host "Bucket '$BucketName' is already added. Updating it..." -ForegroundColor Green
|
||||||
|
scoop update
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
||||||
scoop bucket add $BucketName $BucketUrl
|
scoop bucket add $BucketName $BucketUrl
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Installs Microsoft Edge from the Jonas8272 bucket. Sets up Scoop, git and the
|
||||||
|
bucket first if they are missing.
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Edge is installed through winget, so winget must be available (it ships with
|
||||||
|
current Windows 10 and 11 as App Installer). Edge is already built into
|
||||||
|
Windows, so this usually just reports that it is installed. Edge updates
|
||||||
|
itself, not "scoop update".
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
irm https://codefloe.com/Jonas8272/scoop-bucket/raw/branch/master/installations/install-edge.ps1 | iex
|
||||||
|
|
||||||
|
.NOTES
|
||||||
|
Run in a normal (non-admin) PowerShell window if Scoop is not installed yet.
|
||||||
|
#>
|
||||||
|
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
|
||||||
|
$App = 'edge'
|
||||||
|
$BucketName = 'Jonas8272'
|
||||||
|
$BucketUrl = 'https://codefloe.com/Jonas8272/scoop-bucket'
|
||||||
|
|
||||||
|
function Test-Command($name) {
|
||||||
|
return [bool](Get-Command $name -ErrorAction SilentlyContinue)
|
||||||
|
}
|
||||||
|
|
||||||
|
function Test-Admin {
|
||||||
|
$id = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||||
|
$principal = New-Object Security.Principal.WindowsPrincipal($id)
|
||||||
|
return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||||
|
}
|
||||||
|
|
||||||
|
$scoopRoot = if ($env:SCOOP) { $env:SCOOP } else { Join-Path $env:USERPROFILE 'scoop' }
|
||||||
|
|
||||||
|
# 0. winget (the app is installed through it) ----------------------------------
|
||||||
|
if (-not (Test-Command 'winget')) {
|
||||||
|
throw 'winget was not found. Install "App Installer" from the Microsoft Store, then run this script again.'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 1. Scoop -------------------------------------------------------------------
|
||||||
|
if (-not (Test-Command 'scoop')) {
|
||||||
|
Write-Host 'Scoop not found. Installing Scoop...' -ForegroundColor Cyan
|
||||||
|
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
|
||||||
|
if (Test-Admin) {
|
||||||
|
Invoke-Expression "& {$(Invoke-RestMethod -Uri 'https://get.scoop.sh')} -RunAsAdmin"
|
||||||
|
} else {
|
||||||
|
Invoke-RestMethod -Uri 'https://get.scoop.sh' | Invoke-Expression
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make scoop available in this session without reopening PowerShell
|
||||||
|
$env:PATH = "$scoopRoot\shims;$env:PATH"
|
||||||
|
|
||||||
|
if (-not (Test-Command 'scoop')) {
|
||||||
|
throw 'Scoop was installed but is not on PATH. Open a new PowerShell window and run this script again.'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host 'Scoop is already installed.' -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
# 2. git (needed to add buckets) ----------------------------------------------
|
||||||
|
if (-not (Test-Command 'git')) {
|
||||||
|
Write-Host 'git not found. Installing git through Scoop...' -ForegroundColor Cyan
|
||||||
|
scoop install git
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw 'Failed to install git through Scoop.' }
|
||||||
|
$env:PATH = "$scoopRoot\shims;$env:PATH"
|
||||||
|
} else {
|
||||||
|
Write-Host 'git is already installed.' -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
# 3. Bucket ------------------------------------------------------------------
|
||||||
|
$existing = scoop bucket list | Where-Object {
|
||||||
|
$_.Name -eq $BucketName -or $_.Source -like '*Jonas8272/scoop-bucket*'
|
||||||
|
} | Select-Object -First 1
|
||||||
|
|
||||||
|
if ($existing) {
|
||||||
|
$BucketName = $existing.Name
|
||||||
|
Write-Host "Bucket '$BucketName' is already added. Updating it..." -ForegroundColor Green
|
||||||
|
scoop update
|
||||||
|
} else {
|
||||||
|
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
||||||
|
scoop bucket add $BucketName $BucketUrl
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw "Failed to add bucket '$BucketName'." }
|
||||||
|
}
|
||||||
|
|
||||||
|
# 4. The app -----------------------------------------------------------------
|
||||||
|
Write-Host ''
|
||||||
|
Write-Host "Installing $App..." -ForegroundColor Cyan
|
||||||
|
scoop install "$BucketName/$App"
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw "Failed to install $App." }
|
||||||
|
|
||||||
|
Write-Host ''
|
||||||
|
Write-Host "Done. $App is installed." -ForegroundColor Green
|
||||||
@@ -69,7 +69,8 @@ $existing = scoop bucket list | Where-Object {
|
|||||||
|
|
||||||
if ($existing) {
|
if ($existing) {
|
||||||
$BucketName = $existing.Name
|
$BucketName = $existing.Name
|
||||||
Write-Host "Bucket '$BucketName' is already added." -ForegroundColor Green
|
Write-Host "Bucket '$BucketName' is already added. Updating it..." -ForegroundColor Green
|
||||||
|
scoop update
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
||||||
scoop bucket add $BucketName $BucketUrl
|
scoop bucket add $BucketName $BucketUrl
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ $existing = scoop bucket list | Where-Object {
|
|||||||
|
|
||||||
if ($existing) {
|
if ($existing) {
|
||||||
$BucketName = $existing.Name
|
$BucketName = $existing.Name
|
||||||
Write-Host "Bucket '$BucketName' is already added." -ForegroundColor Green
|
Write-Host "Bucket '$BucketName' is already added. Updating it..." -ForegroundColor Green
|
||||||
|
scoop update
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
||||||
scoop bucket add $BucketName $BucketUrl
|
scoop bucket add $BucketName $BucketUrl
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Installs Netflix from the Jonas8272 bucket. Sets up Scoop, git and the
|
||||||
|
bucket first if they are missing.
|
||||||
|
|
||||||
|
.DESCRIPTION
|
||||||
|
Netflix is installed from the Microsoft Store through winget, so winget
|
||||||
|
must be available (it ships with current Windows 10 and 11 as App Installer).
|
||||||
|
The Store updates it, not "scoop update".
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
irm https://codefloe.com/Jonas8272/scoop-bucket/raw/branch/master/installations/install-netflix.ps1 | iex
|
||||||
|
|
||||||
|
.NOTES
|
||||||
|
Run in a normal (non-admin) PowerShell window if Scoop is not installed yet.
|
||||||
|
#>
|
||||||
|
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
|
||||||
|
$App = 'netflix'
|
||||||
|
$BucketName = 'Jonas8272'
|
||||||
|
$BucketUrl = 'https://codefloe.com/Jonas8272/scoop-bucket'
|
||||||
|
|
||||||
|
function Test-Command($name) {
|
||||||
|
return [bool](Get-Command $name -ErrorAction SilentlyContinue)
|
||||||
|
}
|
||||||
|
|
||||||
|
function Test-Admin {
|
||||||
|
$id = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||||
|
$principal = New-Object Security.Principal.WindowsPrincipal($id)
|
||||||
|
return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||||
|
}
|
||||||
|
|
||||||
|
$scoopRoot = if ($env:SCOOP) { $env:SCOOP } else { Join-Path $env:USERPROFILE 'scoop' }
|
||||||
|
|
||||||
|
# 0. winget (the app comes from the Microsoft Store) --------------------------
|
||||||
|
if (-not (Test-Command 'winget')) {
|
||||||
|
throw 'winget was not found. Install "App Installer" from the Microsoft Store, then run this script again.'
|
||||||
|
}
|
||||||
|
|
||||||
|
# 1. Scoop -------------------------------------------------------------------
|
||||||
|
if (-not (Test-Command 'scoop')) {
|
||||||
|
Write-Host 'Scoop not found. Installing Scoop...' -ForegroundColor Cyan
|
||||||
|
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
|
||||||
|
if (Test-Admin) {
|
||||||
|
Invoke-Expression "& {$(Invoke-RestMethod -Uri 'https://get.scoop.sh')} -RunAsAdmin"
|
||||||
|
} else {
|
||||||
|
Invoke-RestMethod -Uri 'https://get.scoop.sh' | Invoke-Expression
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make scoop available in this session without reopening PowerShell
|
||||||
|
$env:PATH = "$scoopRoot\shims;$env:PATH"
|
||||||
|
|
||||||
|
if (-not (Test-Command 'scoop')) {
|
||||||
|
throw 'Scoop was installed but is not on PATH. Open a new PowerShell window and run this script again.'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host 'Scoop is already installed.' -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
# 2. git (needed to add buckets) ----------------------------------------------
|
||||||
|
if (-not (Test-Command 'git')) {
|
||||||
|
Write-Host 'git not found. Installing git through Scoop...' -ForegroundColor Cyan
|
||||||
|
scoop install git
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw 'Failed to install git through Scoop.' }
|
||||||
|
$env:PATH = "$scoopRoot\shims;$env:PATH"
|
||||||
|
} else {
|
||||||
|
Write-Host 'git is already installed.' -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
# 3. Bucket ------------------------------------------------------------------
|
||||||
|
$existing = scoop bucket list | Where-Object {
|
||||||
|
$_.Name -eq $BucketName -or $_.Source -like '*Jonas8272/scoop-bucket*'
|
||||||
|
} | Select-Object -First 1
|
||||||
|
|
||||||
|
if ($existing) {
|
||||||
|
$BucketName = $existing.Name
|
||||||
|
Write-Host "Bucket '$BucketName' is already added. Updating it..." -ForegroundColor Green
|
||||||
|
scoop update
|
||||||
|
} else {
|
||||||
|
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
||||||
|
scoop bucket add $BucketName $BucketUrl
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw "Failed to add bucket '$BucketName'." }
|
||||||
|
}
|
||||||
|
|
||||||
|
# 4. The app -----------------------------------------------------------------
|
||||||
|
Write-Host ''
|
||||||
|
Write-Host "Installing $App..." -ForegroundColor Cyan
|
||||||
|
scoop install "$BucketName/$App"
|
||||||
|
if ($LASTEXITCODE -ne 0) { throw "Failed to install $App." }
|
||||||
|
|
||||||
|
Write-Host ''
|
||||||
|
Write-Host "Done. $App is installed." -ForegroundColor Green
|
||||||
@@ -65,7 +65,8 @@ $existing = scoop bucket list | Where-Object {
|
|||||||
|
|
||||||
if ($existing) {
|
if ($existing) {
|
||||||
$BucketName = $existing.Name
|
$BucketName = $existing.Name
|
||||||
Write-Host "Bucket '$BucketName' is already added." -ForegroundColor Green
|
Write-Host "Bucket '$BucketName' is already added. Updating it..." -ForegroundColor Green
|
||||||
|
scoop update
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
||||||
scoop bucket add $BucketName $BucketUrl
|
scoop bucket add $BucketName $BucketUrl
|
||||||
|
|||||||
@@ -75,14 +75,15 @@ $existing = scoop bucket list | Where-Object {
|
|||||||
|
|
||||||
if ($existing) {
|
if ($existing) {
|
||||||
$BucketName = $existing.Name
|
$BucketName = $existing.Name
|
||||||
Write-Host "Bucket '$BucketName' is already added." -ForegroundColor Green
|
Write-Host "Bucket '$BucketName' is already added. Updating it..." -ForegroundColor Green
|
||||||
|
scoop update
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
Write-Host "Adding bucket '$BucketName'..." -ForegroundColor Cyan
|
||||||
scoop bucket add $BucketName $BucketUrl
|
scoop bucket add $BucketName $BucketUrl
|
||||||
if ($LASTEXITCODE -ne 0) { throw "Failed to add bucket '$BucketName'." }
|
if ($LASTEXITCODE -ne 0) { throw "Failed to add bucket '$BucketName'." }
|
||||||
}
|
}
|
||||||
|
|
||||||
# 4. The app -----------------------------------------------------------------
|
# 4. The app ------------------------------------------------------------------
|
||||||
Write-Host ''
|
Write-Host ''
|
||||||
Write-Host "Installing $App..." -ForegroundColor Cyan
|
Write-Host "Installing $App..." -ForegroundColor Cyan
|
||||||
scoop install "$BucketName/$App"
|
scoop install "$BucketName/$App"
|
||||||
|
|||||||
Reference in new issue
Block a user