]> apps.delaporte.us Git - dotfiles.git/blobdiff - setup/powershell.sh
Update game name
[dotfiles.git] / setup / powershell.sh
index 6b873245d460d87173723acf7b9517433c432f5e..5994882d523de24ec8d7e0dc2cb1393686b4c00c 100755 (executable)
@@ -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