mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
ref!: add 'powershell' as alias for 'pwsh'
This commit is contained in:
11
powershell/README.md
Normal file
11
powershell/README.md
Normal 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
8
powershell/install.ps1
Normal 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
11
powershell/install.sh
Normal 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
|
||||
Reference in New Issue
Block a user