Skip to content

Commit c9c393f

Browse files
committed
feat(ubuntu): 添加旧版PowerShell安装脚本
添加用于在Ubuntu上安装旧版PowerShell(7.5.1)的bash脚本
1 parent dbda6cd commit c9c393f

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
4+
###################################
5+
# Prerequisites
6+
7+
# Update the list of packages
8+
sudo apt-get update
9+
10+
# Install pre-requisite packages.
11+
sudo apt-get install -y wget
12+
13+
# Download the PowerShell package file
14+
wget https://github.com/PowerShell/PowerShell/releases/download/v7.5.1/powershell_7.5.1-1.deb_amd64.deb
15+
16+
###################################
17+
# Install the PowerShell package
18+
sudo dpkg -i powershell_7.5.1-1.deb_amd64.deb
19+
20+
# Resolve missing dependencies and finish the install (if necessary)
21+
sudo apt-get install -f
22+
23+
# Delete the downloaded package file
24+
rm powershell_7.5.1-1.deb_amd64.deb
25+
26+
# Start PowerShell Preview
27+
pwsh

0 commit comments

Comments
 (0)