Skip to content

Commit

Permalink
fix choice, and add scoop/smoothie install commands
Browse files Browse the repository at this point in the history
  • Loading branch information
couleurm committed Feb 4, 2022
1 parent d07cf96 commit cbb9cf5
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions install/pre.ps1
Original file line number Diff line number Diff line change
@@ -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
}
Expand All @@ -41,3 +50,5 @@ if(Get-Command ffmpeg -Ea Ignore){
}else{
scoop.cmd install ffmpeg
}

scoop.cmd install utils/smoothie

0 comments on commit cbb9cf5

Please sign in to comment.