From c6aca5216b0a49140cbb261c39e9b970fe7670ff Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 30 Jun 2020 11:50:34 -0600 Subject: [PATCH] add shebang to all .ps1 --- _webi/bootstrap.ps1 | 2 ++ _webi/template.ps1 | 4 +++- _webi/webi.ps1 | 4 +++- node/install.ps1 | 3 ++- pathman/install.ps1 | 2 ++ vps-myip/install.ps1 | 2 ++ webi/install.ps1 | 2 ++ 7 files changed, 16 insertions(+), 3 deletions(-) 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 -- 2.25.1