From 492e071f20b27d8fe80fb2b22ee5f69445b4590d Mon Sep 17 00:00:00 2001 From: Simon Daniel Streich Date: Wed, 15 Jul 2026 12:08:45 +0200 Subject: [PATCH] installer script --- .gitignore | 3 ++- installer/scoop.PS1 | 52 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 installer/scoop.PS1 diff --git a/.gitignore b/.gitignore index 7664704..c51cd35 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*.bak \ No newline at end of file +*.bak +*.exe \ No newline at end of file diff --git a/installer/scoop.PS1 b/installer/scoop.PS1 new file mode 100644 index 0000000..2fa127b --- /dev/null +++ b/installer/scoop.PS1 @@ -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://git.streichtech.ch/elexis/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 ee-cli" -ForegroundColor Cyan +Write-Host "" +Read-Host "Enter drücken zum Beenden" \ No newline at end of file