]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - install/powershell.sh
Add a couple optional paths
[dotfiles.git] / install / powershell.sh
index 0f7b2ebf7c13cb2f537a7d112e1f2bcbdb5aa520..fc113cba14570ce0d14fcda2be9bcd946d6b1488 100755 (executable)
@@ -1,8 +1,31 @@
-## Setup PowerShell
 if [ ! -f ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ]; then
 if [ ! -f ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ]; then
-       echo "************** Install PowerShell and setup profile"
-       sudo apt-get install powershell
-       chsh --shell /usr/bin/pwsh
-       mkdir -p ~/.config/powershell/
-       ln -s ~/dotfiles/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1 
-fi
+
+###################################
+# Prerequisites
+
+# Update the list of packages
+sudo apt-get update
+
+# Install pre-requisite packages.
+sudo apt-get install -y wget
+
+# Get the version of Debian
+source /etc/os-release
+
+# Download the Microsoft repository GPG keys
+wget -q https://packages.microsoft.com/config/debian/$VERSION_ID/packages-microsoft-prod.deb
+
+# Register the Microsoft repository GPG keys
+sudo dpkg -i packages-microsoft-prod.deb
+
+# Delete the Microsoft repository GPG keys file
+rm packages-microsoft-prod.deb
+
+# Update the list of packages after we added packages.microsoft.com
+sudo apt-get update
+
+###################################
+# Install PowerShell
+sudo apt-get install -y powershell
+
+fi
\ No newline at end of file