ref!: add 'powershell' as alias for 'pwsh'

This commit is contained in:
AJ ONeal
2023-11-11 23:57:43 -07:00
parent 8ed7909e15
commit fc8cef1308
3 changed files with 30 additions and 0 deletions

11
powershell/README.md Normal file
View File

@@ -0,0 +1,11 @@
---
title: PowerShell (pwsh alias)
homepage: https://webinstall.dev/pwsh
tagline: |
Alias for https://webinstall.dev/pwsh
alias: pwsh
description: |
See https://webinstall.dev/pwsh
---
Alias for https://webinstall.dev/pwsh

8
powershell/install.ps1 Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/pwsh
Write-Output "'powershell@$Env:WEBI_TAG' is an alias for 'pwsh@$Env:WEBI_VERSION'"
$PwshBootUrl = "$Env:WEBI_HOST/pwsh@$Env:WEBI_VERSION"
$PwshBootScript = "$HOME\.local\tmp\install-pwsh-boot.ps1"
Invoke-DownloadUrl -Force -URL $PwshBootUrl -Path $PwshBootScript
pwsh -ExecutionPolicy Bypass $PwshBootScript

11
powershell/install.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
set -u
__redirect_alias_pwsh() {
echo "'powershell@${WEBI_TAG:-stable}' is an alias for 'pwsh@${WEBI_VERSION-}'"
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
curl -fsSL "$WEBI_HOST/pwsh@${WEBI_VERSION-}" | sh
}
__redirect_alias_pwsh