From: AJ ONeal Date: Tue, 30 Jun 2020 17:50:34 +0000 (-0600) Subject: add shebang to all .ps1 X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=c6aca5216b0a49140cbb261c39e9b970fe7670ff;p=webi-installers%2F.git add shebang to all .ps1 --- diff --git a/_webi/bootstrap.ps1 b/_webi/bootstrap.ps1 index f4f1a09..18b0bf8 100644 --- a/_webi/bootstrap.ps1 +++ b/_webi/bootstrap.ps1 @@ -1,3 +1,5 @@ +#!/usr/bin/env pwsh + # If a command returns an error, halt the script. $ErrorActionPreference = 'Stop' diff --git a/_webi/template.ps1 b/_webi/template.ps1 index e3f7278..7a72e70 100644 --- a/_webi/template.ps1 +++ b/_webi/template.ps1 @@ -1,4 +1,6 @@ -# If a command returns an error, halt the script. +#!/usr/bin/env pwsh + +# If a command returns an error, halt the script. $ErrorActionPreference = 'Stop' # Ignore progress events from cmdlets so Invoke-WebRequest is not painfully slow diff --git a/_webi/webi.ps1 b/_webi/webi.ps1 index 7ec0c1d..21a4e95 100644 --- a/_webi/webi.ps1 +++ b/_webi/webi.ps1 @@ -1,4 +1,6 @@ -# If a command returns an error, halt the script. +#!/usr/bin/env pwsh + +# If a command returns an error, halt the script. $ErrorActionPreference = 'Stop' # Ignore progress events from cmdlets so Invoke-WebRequest is not painfully slow diff --git a/node/install.ps1 b/node/install.ps1 index 64a6096..a7fe891 100644 --- a/node/install.ps1 +++ b/node/install.ps1 @@ -1,5 +1,6 @@ -# Fetch archive +#!/usr/bin/env pwsh +# Fetch archive IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE")) { # TODO: arch detection diff --git a/pathman/install.ps1 b/pathman/install.ps1 index dd729e4..5ec3a4b 100644 --- a/pathman/install.ps1 +++ b/pathman/install.ps1 @@ -1 +1,3 @@ +#!/usr/bin/env pwsh + curl.exe -fsSL -A "$Env:WEBI_UA" "https://rootprojects.org/pathman/dist/windows/amd64/pathman.exe" -o "$Env:USERPROFILE\.local\bin\pathman.exe" diff --git a/vps-myip/install.ps1 b/vps-myip/install.ps1 index 81fb0ce..2cde75e 100644 --- a/vps-myip/install.ps1 +++ b/vps-myip/install.ps1 @@ -1,3 +1,5 @@ +#!/usr/bin/env pwsh + $ipv4 = curl.exe -sf https://api.ipify.org IF(!($ipv4 -eq $null -or $ipv4 -eq "")) { diff --git a/webi/install.ps1 b/webi/install.ps1 index 9689b72..91a2774 100644 --- a/webi/install.ps1 +++ b/webi/install.ps1 @@ -1 +1,3 @@ +#!/usr/bin/env pwsh + # do nothing because this is a special case