]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
Powershell 7 for Pi
authorEdTheDev <edward@delaporte.us>
Sat, 13 Mar 2021 21:46:30 +0000 (15:46 -0600)
committerEdTheDev <edward@delaporte.us>
Sat, 13 Mar 2021 21:46:30 +0000 (15:46 -0600)
install/install-powershell-6-pi.sh [deleted file]
install/pi_powershell7.sh [new file with mode: 0644]
install/powershell.sh
setup/powershell.sh [new file with mode: 0644]

diff --git a/install/install-powershell-6-pi.sh b/install/install-powershell-6-pi.sh
deleted file mode 100755 (executable)
index 1a2e2a4..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-echo "Install PowerShell 6.2.0"
-
-if [ ! -d /opt/powershell ]; then
-
-cd /tmp
-wget https://github.com/PowerShell/PowerShell/releases/download/v6.2.0/powershell-6.2.0-linux-arm32.tar.gz
-mkdir /opt/powershell
-tar -xvf ./powershell-6.2.0-linux-arm32.tar.gz -C /opt/powershell
-
-echo "PowerShell is now at /opt/powershell/pswsh"
-echo "Remember to update your path."
-
-fi
-
-ln -s /opt/powershell/pwsh /usr/bin/pwsh
-ls /usr/bin/pwsh -alis
-chmod 755 -R /opt/powershell/pwsh
-rm /opt/powershell/DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY
-
diff --git a/install/pi_powershell7.sh b/install/pi_powershell7.sh
new file mode 100644 (file)
index 0000000..0127478
--- /dev/null
@@ -0,0 +1,25 @@
+
+## https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1#raspbian
+
+
+###################################
+# Prerequisites
+
+# Update package lists
+sudo apt-get update
+
+# Install libunwind8 and libssl1.0
+# Regex is used to ensure that we do not install libssl1.0-dev, as it is a variant that is not required
+sudo apt-get install '^libssl1.0.[0-9]$' libunwind8 -y
+
+###################################
+# Download and extract PowerShell
+
+# Grab the latest tar.gz
+wget https://github.com/PowerShell/PowerShell/releases/download/v7.1.2/powershell-7.1.2-linux-arm32.tar.gz
+
+# Make folder to put powershell
+mkdir /etc/powershell
+
+# Unpack the tar.gz file
+tar -xvf ./powershell-7.1.2-linux-arm32.tar.gz -C /etc/powershell
\ No newline at end of file
index 0f7b2ebf7c13cb2f537a7d112e1f2bcbdb5aa520..038e76abff9d602b1b6cb22e299e62377ec3180d 100755 (executable)
@@ -1,8 +1,4 @@
-## Setup PowerShell
 if [ ! -f ~/.config/powershell/Microsoft.PowerShell_profile.ps1 ]; then
-       echo "************** Install PowerShell and setup profile"
+       echo "************** Install PowerShell"
        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
+fi
\ No newline at end of file
diff --git a/setup/powershell.sh b/setup/powershell.sh
new file mode 100644 (file)
index 0000000..a1d2c0e
--- /dev/null
@@ -0,0 +1,6 @@
+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 
+fi
\ No newline at end of file