bucket-update-scripts für neues repo

This commit is contained in:
Simon Daniel Streich committed 2026-10-21 10:34:05 +02:00
1 parent 079e69963d
commit 795a056564
3 files changed
+224 -2

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
# 1. SCOOP CHECK & INSTALL
$bucketList = scoop bucket list 2>$null | Out-String
if ($bucketList) {
Write-Host "Scoop ist bereits installiert." -ForegroundColor White
}
else {
Write-Host "Scoop wird installiert..." -ForegroundColor Yellow
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
$scoopInstallationsSkript = Invoke-RestMethod -Uri "https://get.scoop.sh"
Invoke-Expression $scoopInstallationsSkript
$bucketList = scoop bucket list 2>$null | Out-String
}
# 2. GIT CHECK & INSTALL
if ((git --version 2>$null) -match "git version") {
Write-Host "Git ist bereits installiert." -ForegroundColor White
}
else {
Write-Host "Git wird installiert..." -ForegroundColor Yellow
scoop install git
if ((git --version 2>$null) -match "git version") {
Write-Host "Git wurde erfolgreich installiert." -ForegroundColor Green
}
else {
Write-Host "Error: Git konnte nicht installiert werden." -ForegroundColor Red
exit 1
}
}
# 3. BUCKET CHECKS
if ($bucketList -match "elexis") {
Write-Host "elexis Bucket ist bereits vorhanden." -ForegroundColor White
}
else {
scoop bucket add elexis https://gitea.medelexis.ch/public/scoop
Write-Host "elexis Bucket hinzugefügt." -ForegroundColor Green
}
if ($bucketList -match "extras") {
Write-Host "Extras Bucket ist bereits vorhanden." -ForegroundColor White
}
else {
scoop bucket add extras
Write-Host "Extras Bucket hinzugefügt." -ForegroundColor Green
}
Write-Host ""
Write-Host "Fertig! Verfügbare Apps anzeigen mit: scoop search" -ForegroundColor Cyan
Write-Host "Bsp. scoop search myelexis-cli" -ForegroundColor Cyan
Write-Host ""
Read-Host "Enter drücken zum Beenden"