From 7d1728e212360ec8875ec671230b8482fab6467f Mon Sep 17 00:00:00 2001 From: EdTheDev Date: Sat, 2 Dec 2023 23:45:09 -0600 Subject: [PATCH] Updated setup for Linux --- setup/powershell.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/setup/powershell.sh b/setup/powershell.sh index 6b87324..5994882 100755 --- a/setup/powershell.sh +++ b/setup/powershell.sh @@ -1,8 +1,16 @@ -if [ ! -f ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ]; then - echo "************** Link PowerShell profile" - chsh --shell /usr/bin/pwsh - mkdir -p ~/.config/powershell/ - ln -s ~/dotfiles/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1 + +echo "************** Link PowerShell profile" +mkdir -p ~/.config/powershell/ +mv ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/profile.backup.ps1 +ln -s ~/dotfiles/files/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1 + +echo "************** Install PowerShell" +sudo snap install powershell --classic + +if ! [ -f /etc/shells ] || ! grep -q '^/snap/bin/powershell$' /etc/shells; then + echo "************** Add PowerShell to /etc/shells" + echo '/snap/bin/powershell' | sudo tee -a /etc/shells fi -chsh --shell /usr/bin/pwsh +echo "************** Choose Shell: PowerShell" +chsh --shell /snap/bin/powershell -- 2.47.3