From cbb9cf51bb6913802e2a3e4be6658e4993b227b3 Mon Sep 17 00:00:00 2001 From: Couleur <82747632+couleurm@users.noreply.github.com> Date: Fri, 4 Feb 2022 22:22:09 +0100 Subject: [PATCH] fix choice, and add scoop/smoothie install commands --- install/pre.ps1 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/install/pre.ps1 b/install/pre.ps1 index 558264a..e3089c6 100644 --- a/install/pre.ps1 +++ b/install/pre.ps1 @@ -1,27 +1,36 @@ if (Get-Command sm -Ea Ignore){ - "@ +"@ A Smoothie installation has been detected, what would you like to do? -R - Reinstall smoothie (clean install) -U - Update smoothie to a newer version +Press R to Reinstall Smoothie (clean install) +Press V to update Smoothie to a newer Version +Press U to uninstall Smoothie @" -switch (choice.exe /C RU /N | Out-Null){ +switch (choice.exe /C RVU /N | Out-Null){ 1{ scoop.cmd uninstall smoothie scoop.cmd install smoothie + pause exit } 2{ scoop.cmd update smoothie + pause exit } 3{ scoop.cmd uninstall smoothie + pause + exit } } } +if (-Not(Get-Command scoop.cmd -Ea Ignore)){ + Invoke-RestMethod -Uri http://get.scoop.sh | Invoke-Expression +} + if (-Not(Get-Command git -Ea Ignore)){ scoop.cmd install git } @@ -41,3 +50,5 @@ if(Get-Command ffmpeg -Ea Ignore){ }else{ scoop.cmd install ffmpeg } + +scoop.cmd install utils/smoothie