From f98086b38ea6ec7a4041c78c1a91a634490a1db8 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 17 Oct 2023 23:59:22 -0600 Subject: [PATCH] chore(pwsh): fmt --- _example/install.ps1 | 40 +++++++++++++------------- _vim-example/install.ps1 | 4 +-- _webi/bootstrap.ps1 | 6 ++-- _webi/template.ps1 | 51 +++++++++++++++------------------- _webi/webi-pwsh.ps1 | 25 ++++++++--------- arc/install.ps1 | 30 ++++++++++---------- archiver/install.ps1 | 2 +- atomicparsley/install.ps1 | 10 +++---- awless/install.ps1 | 10 +++---- bat/install.ps1 | 35 +++++++++++------------ caddy/install.ps1 | 10 +++---- chromedriver/install.ps1 | 38 ++++++++++++------------- cmake/install.ps1 | 30 ++++++++++---------- comrak/install.ps1 | 26 ++++++++--------- curlie/install.ps1 | 32 ++++++++++----------- dashcore/install.ps1 | 30 ++++++++++---------- dashd/install.ps1 | 30 ++++++++++---------- dashmsg/install.ps1 | 34 +++++++++++------------ delta/install.ps1 | 48 +++++++++++++++----------------- deno/install.ps1 | 30 ++++++++++---------- dotenv-linter/install.ps1 | 37 ++++++++++++------------ dotenv/install.ps1 | 34 +++++++++++------------ fd/install.ps1 | 32 ++++++++++----------- ffmpeg/install.ps1 | 24 ++++++++-------- ffuf/install.ps1 | 42 +++++++++++++--------------- fzf/install.ps1 | 32 ++++++++++----------- gh/install.ps1 | 40 +++++++++++++------------- git-gpg-init/install.ps1 | 2 +- git/install.ps1 | 42 +++++++++++++--------------- gitdeploy/install.ps1 | 34 +++++++++++------------ gitea/install.ps1 | 30 ++++++++++---------- go-essentials/install.ps1 | 5 ++-- go/install.ps1 | 37 ++++++++++++------------ golang/install.ps1 | 37 ++++++++++++------------ goreleaser/install.ps1 | 34 +++++++++++------------ gpg-pubkey/gpg-pubkey-id.ps1 | 2 +- gpg-pubkey/gpg-pubkey.ps1 | 5 ++-- gpg-pubkey/install.ps1 | 2 +- gpg/install.ps1 | 2 +- gprox/install.ps1 | 40 +++++++++++++------------- grype/install.ps1 | 16 +++++------ hugo-extended/install.ps1 | 10 +++---- hugo/install.ps1 | 10 +++---- jq/install.ps1 | 28 +++++++++---------- k9s/install.ps1 | 34 +++++++++++------------ keypairs/install.ps1 | 34 +++++++++++------------ kind/install.ps1 | 24 ++++++++-------- kubectx/install.ps1 | 34 +++++++++++------------ kubens/install.ps1 | 34 +++++++++++------------ lf/install.ps1 | 24 ++++++++-------- lsd/install.ps1 | 34 +++++++++++------------ mutagen/install.ps1 | 24 ++++++++-------- myip/install.ps1 | 2 +- myip/myip.ps1 | 8 ++---- nerdfont/install.ps1 | 9 +++--- node/install.ps1 | 32 ++++++++++----------- ots/install.ps1 | 34 +++++++++++------------ pandoc/install.ps1 | 34 +++++++++++------------ pathman/install.ps1 | 34 +++++++++++------------ rclone/install.ps1 | 34 +++++++++++------------ rg/install.ps1 | 34 +++++++++++------------ ripgrep/install.ps1 | 2 +- sass/install.ps1 | 24 ++++++++-------- sclient/install.ps1 | 34 +++++++++++------------ sd/install.ps1 | 34 +++++++++++------------ serviceman/install.ps1 | 34 +++++++++++------------ shellcheck/install.ps1 | 34 +++++++++++------------ shfmt/install.ps1 | 24 ++++++++-------- sqlpkg/install.ps1 | 34 +++++++++++------------ ssh-pubkey/install.ps1 | 2 +- ssh-pubkey/ssh-pubkey.ps1 | 16 ++++------- sttr/install.ps1 | 34 +++++++++++------------ sudo/install.ps1 | 2 +- syncthing/install.ps1 | 34 +++++++++++------------ terraform/install.ps1 | 10 +++---- vcruntime/install.ps1 | 12 ++++---- vim-airline-themes/install.ps1 | 4 +-- vim-airline/install.ps1 | 4 +-- vim-ale/install.ps1 | 4 +-- vim-commentary/install.ps1 | 4 +-- vim-devicons/install.ps1 | 4 +-- vim-go/install.ps1 | 4 +-- vim-lastplace/install.ps1 | 4 +-- vim-nerdtree/install.ps1 | 4 +-- vim-prettier/install.ps1 | 4 +-- vim-rust/install.ps1 | 4 +-- vim-sensible/install.ps1 | 4 +-- vim-shfmt/install.ps1 | 4 +-- vim-smartcase/install.ps1 | 2 +- vim-syntastic/install.ps1 | 4 +-- watchexec/install.ps1 | 30 ++++++++++---------- webi/install.ps1 | 2 +- wsl/install-wsl.ps1 | 17 +++++------- wsl/install.ps1 | 20 ++++++------- wsl1/install.ps1 | 2 +- wsl2/install-wsl2.ps1 | 17 +++++------- wsl2/install.ps1 | 14 ++++------ xsv/install.ps1 | 16 +++++------ xz/install.ps1 | 32 ++++++++++----------- yq/install.ps1 | 26 ++++++++--------- zig/install.ps1 | 30 ++++++++++---------- ziglang/install.ps1 | 2 +- zoxide/install.ps1 | 4 +-- 103 files changed, 1007 insertions(+), 1150 deletions(-) diff --git a/_example/install.ps1 b/_example/install.ps1 index b8fa315..afea636 100644 --- a/_example/install.ps1 +++ b/_example/install.ps1 @@ -15,47 +15,45 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\foobar-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\foobar-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading foobar from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing foobar" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\foobar-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\foo.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\foobar-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\foo.exe" -Recurse -ErrorAction Ignore - # NOTE: DELETE THIS COMMENT IF NOT USED - # Move single binary into root of temporary folder - #& move "$pkg_download" "foo.exe" + # NOTE: DELETE THIS COMMENT IF NOT USED + # Move single binary into root of temporary folder + #& move "$pkg_download" "foo.exe" - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\foobar-*\foo.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\foobar-*\foo.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/_vim-example/install.ps1 b/_vim-example/install.ps1 index 0ac1b2c..b1e7fbd 100644 --- a/_vim-example/install.ps1 +++ b/_vim-example/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\example" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/CHANGEME/example.git "$Env:USERPROFILE\.vim\pack\plugins\start\example" +& git clone --depth=1 https://github.com/CHANGEME/example.git "$Env:USERPROFILE\.vim\pack\plugins\start\example" \ No newline at end of file diff --git a/_webi/bootstrap.ps1 b/_webi/bootstrap.ps1 index bf7b9ff..bb2e1ca 100644 --- a/_webi/bootstrap.ps1 +++ b/_webi/bootstrap.ps1 @@ -4,9 +4,9 @@ #

Cheat Sheet at CHEATSHEET_URL

# ############################################################ -New-Item -Path "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null -New-Item -Path "$Env:USERPROFILE\.local\bin" -ItemType Directory -Force | out-null +New-Item -Path "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null +New-Item -Path "$Env:USERPROFILE\.local\bin" -ItemType Directory -Force | Out-Null IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } curl.exe -s -A "windows" "$Env:WEBI_HOST/packages/_webi/webi-pwsh.ps1" -o "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" Set-ExecutionPolicy -Scope Process Bypass -& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" "{{ exename }}" +& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" "{{ exename }}" \ No newline at end of file diff --git a/_webi/template.ps1 b/_webi/template.ps1 index 54062c4..03a8e36 100644 --- a/_webi/template.ps1 +++ b/_webi/template.ps1 @@ -1,13 +1,13 @@ -#!/usr/bin/env pwsh +#!/usr/bin/env pwsh #350 check if windows user run as admin function Confirm-IsElevated { - $id = [System.Security.Principal.WindowsIdentity]::GetCurrent() - $p = New-Object System.Security.Principal.WindowsPrincipal($id) - if ($p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)) - { Write-Output $true } - else - { Write-Output $false } + $id = [System.Security.Principal.WindowsIdentity]::GetCurrent() + $p = New-Object System.Security.Principal.WindowsPrincipal($id) + if ($p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)) + { Write-Output $true } + else + { Write-Output $false } } if (Confirm-IsElevated) @@ -35,15 +35,14 @@ $Env:WEBI_HOST = 'https://webinstall.dev' pushd $Env:USERPROFILE # Make paths -New-Item -Path Downloads -ItemType Directory -Force | out-null -New-Item -Path .local\bin -ItemType Directory -Force | out-null -New-Item -Path .local\opt -ItemType Directory -Force | out-null +New-Item -Path Downloads -ItemType Directory -Force | Out-Null +New-Item -Path .local\bin -ItemType Directory -Force | Out-Null +New-Item -Path .local\opt -ItemType Directory -Force | Out-Null # {{ baseurl }} # {{ version }} -function webi_path_add($pathname) -{ +function webi_path_add($pathname) { # C:\Users\me => C:/Users/me $my_home = $Env:UserProfile $my_home = $my_home.replace('\\', '/') @@ -57,41 +56,35 @@ function webi_path_add($pathname) $my_pathname = $my_pathname -ireplace $my_home_re, "%USERPROFILE%" $all_user_paths = [Environment]::GetEnvironmentVariable("Path", "User") - $user_paths = $all_user_paths -Split(';') + $user_paths = $all_user_paths -Split (';') $exists_in_path = $false - foreach ($user_path in $user_paths) - { + foreach ($user_path in $user_paths) { # C:\Users\me\bin => %USERPROFILE%/bin $my_user_path = $user_path.replace('\\', '/') $my_user_path = $my_user_path -ireplace $my_home_re, "%USERPROFILE%" - if ($my_user_path -ieq $my_pathname) - { + if ($my_user_path -ieq $my_pathname) { $exists_in_path = $true } } - if (-Not $exists_in_path) - { + if (-Not $exists_in_path) { $all_user_paths = $pathname + ";" + $all_user_paths [Environment]::SetEnvironmentVariable("Path", $all_user_paths, "User") } - $session_paths = $Env:Path -Split(';') + $session_paths = $Env:Path -Split (';') $in_session_path = $false - foreach ($session_path in $session_paths) - { + foreach ($session_path in $session_paths) { # C:\Users\me\bin => %USERPROFILE%/bin $my_session_path = $session_path.replace('\\', '/') $my_session_path = $my_session_path -ireplace $my_home_re, "%USERPROFILE%" - if ($my_session_path -ieq $my_pathname) - { + if ($my_session_path -ieq $my_pathname) { $in_session_path = $true } } - if (-Not $in_session_path) - { + if (-Not $in_session_path) { $my_cmd = 'PATH ' + "$pathname" + ';%PATH%' $my_pwsh = '$Env:Path = "' + "$pathname" + ';$Env:Path"' @@ -117,12 +110,12 @@ function webi_path_add($pathname) #$has_local_bin = echo "$Env:PATH" | Select-String -Pattern '\.local.bin' #if (!$has_local_bin) #{ - webi_path_add ~/.local/bin +webi_path_add ~/.local/bin #} -{{ installer }} +{ { installer } } webi_path_add ~/.local/bin # Done -popd +popd \ No newline at end of file diff --git a/_webi/webi-pwsh.ps1 b/_webi/webi-pwsh.ps1 index b807616..c0ff4e6 100644 --- a/_webi/webi-pwsh.ps1 +++ b/_webi/webi-pwsh.ps1 @@ -1,4 +1,4 @@ -#!/usr/bin/env pwsh +#!/usr/bin/env pwsh # this allows us to call ps1 files, which allows us to have spaces in filenames # ('powershell "$Env:USERPROFILE\test.ps1" foo' will fail if it has a space in @@ -14,8 +14,8 @@ $ProgressPreference = 'SilentlyContinue' # This is the canonical CPU arch when the process is emulated $my_arch = "$Env:PROCESSOR_ARCHITEW6432" IF ($my_arch -eq $null -or $my_arch -eq "") { - # This is the canonical CPU arch when the process is native - $my_arch = "$Env:PROCESSOR_ARCHITECTURE" + # This is the canonical CPU arch when the process is native + $my_arch = "$Env:PROCESSOR_ARCHITECTURE" } IF ($my_arch -eq "AMD64") { # Because PowerShell isn't ARM yet. @@ -35,28 +35,25 @@ $exename = $args[0] pushd $Env:USERPROFILE # Make paths if needed -New-Item -Path .local\bin -ItemType Directory -Force | out-null +New-Item -Path .local\bin -ItemType Directory -Force | Out-Null # TODO replace all xbin with opt\bin\ -New-Item -Path .local\xbin -ItemType Directory -Force | out-null +New-Item -Path .local\xbin -ItemType Directory -Force | Out-Null # See note on Set-ExecutionPolicy above Set-Content -Path .local\bin\webi.bat -Value "@echo off`r`npushd %USERPROFILE%`r`npowershell -ExecutionPolicy Bypass .local\bin\webi-pwsh.ps1 %1`r`npopd" # Backwards-compat bugfix: remove old webi-pwsh.ps1 location Remove-Item -Path .local\bin\webi.ps1 -Recurse -ErrorAction Ignore -if (!(Test-Path -Path .local\opt)) -{ - New-Item -Path .local\opt -ItemType Directory -Force | out-null +if (!(Test-Path -Path .local\opt)) { + New-Item -Path .local\opt -ItemType Directory -Force | Out-Null } # TODO windows version of mktemp -d -if (!(Test-Path -Path .local\tmp)) -{ - New-Item -Path .local\tmp -ItemType Directory -Force | out-null +if (!(Test-Path -Path .local\tmp)) { + New-Item -Path .local\tmp -ItemType Directory -Force | Out-Null } # TODO SetStrictMode # TODO Test-Path variable:global:Env:WEBI_HOST ??? -IF($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") -{ +IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } @@ -112,4 +109,4 @@ echo "Downloading $PKG_URL" powershell .\.local\tmp\$exename.install.ps1 # Done -popd +popd \ No newline at end of file diff --git a/arc/install.ps1 b/arc/install.ps1 index 65eaf09..9791a22 100644 --- a/arc/install.ps1 +++ b/arc/install.ps1 @@ -15,41 +15,39 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\archiver-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\archiver-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading archiver from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing archiver" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\arc-*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\arc.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\arc-*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\arc.exe" -Recurse -ErrorAction Ignore - # Move single binary into root of temporary folder - & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "arc.exe" + # Move single binary into root of temporary folder + & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "arc.exe" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path "arc.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path "arc.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/archiver/install.ps1 b/archiver/install.ps1 index 9c30b1f..700464e 100644 --- a/archiver/install.ps1 +++ b/archiver/install.ps1 @@ -2,4 +2,4 @@ echo "'archiver@$Env:WEBI_TAG' is an alias for 'arc@$Env:WEBI_VERSION'" IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } -curl.exe -fsSL "$Env:WEBI_HOST/arc@$Env:WEBI_VERSION" | powershell +curl.exe -fsSL "$Env:WEBI_HOST/arc@$Env:WEBI_VERSION" | powershell \ No newline at end of file diff --git a/atomicparsley/install.ps1 b/atomicparsley/install.ps1 index 26d1573..7d2e22d 100644 --- a/atomicparsley/install.ps1 +++ b/atomicparsley/install.ps1 @@ -16,7 +16,7 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\AtomicParsley-v$Env:WEBI_VERSION\bin $pkg_src_dir = "$Env:USERPROFILE\.local\opt\AtomicParsley-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive @@ -47,7 +47,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { # Settle unpacked archive into place echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null Move-Item -Path ".\AtomicParsley.exe" -Destination "$pkg_src_bin" # Exit tmp @@ -55,6 +55,6 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +New-Item "$pkg_dst_bin" -ItemType Directory -Force | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/awless/install.ps1 b/awless/install.ps1 index 013e657..b8f8315 100644 --- a/awless/install.ps1 +++ b/awless/install.ps1 @@ -16,7 +16,7 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\awless-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\awless-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive @@ -44,7 +44,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { # Settle unpacked archive into place echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null Move-Item -Path ".\awless.exe" -Destination "$pkg_src_bin" # Exit tmp @@ -52,6 +52,6 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +New-Item "$pkg_dst_bin" -ItemType Directory -Force | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/bat/install.ps1 b/bat/install.ps1 index e676c4d..0cefa7d 100644 --- a/bat/install.ps1 +++ b/bat/install.ps1 @@ -3,8 +3,7 @@ $VERNAME = "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" $EXENAME = "$Env:PKG_NAME.exe" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" @@ -12,34 +11,32 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) # Fetch MSVC Runtime echo "Checking for MSVC Runtime..." -IF (-not (Test-Path "\Windows\System32\vcruntime140.dll")) -{ +IF (-not (Test-Path "\Windows\System32\vcruntime140.dll")) { & "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" vcruntime } -IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) { echo "Installing $Env:PKG_NAME" # TODO: temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore - # Unpack archive - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - # Move single binary into root of temporary folder - & move "bat-*\$EXENAME" "$VERNAME" + # Unpack archive + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + # Move single binary into root of temporary folder + & move "bat-*\$EXENAME" "$VERNAME" - # Settle unpacked archive into place - echo "New Name: $VERNAME" - echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" - Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" + # Settle unpacked archive into place + echo "New Name: $VERNAME" + echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" + Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" # Exit tmp popd @@ -47,4 +44,4 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) echo "Copying into '$Env:USERPROFILE\.local\bin\$EXENAME' from '$Env:USERPROFILE\.local\xbin\$VERNAME'" Remove-Item -Path "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse -ErrorAction Ignore -Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse +Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse \ No newline at end of file diff --git a/caddy/install.ps1 b/caddy/install.ps1 index b3ba7e5..09cb3ad 100644 --- a/caddy/install.ps1 +++ b/caddy/install.ps1 @@ -16,7 +16,7 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\caddy-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\caddy-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive @@ -44,7 +44,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { # Settle unpacked archive into place echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null Move-Item -Path ".\caddy.exe" -Destination "$pkg_src_bin" # Exit tmp @@ -52,6 +52,6 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +New-Item "$pkg_dst_bin" -ItemType Directory -Force | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/chromedriver/install.ps1 b/chromedriver/install.ps1 index f66de6f..255c57e 100644 --- a/chromedriver/install.ps1 +++ b/chromedriver/install.ps1 @@ -15,46 +15,44 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\chromedriver-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\chromedriver-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading chromedriver from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing chromedriver" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\chromedriver.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\chromedriver.exe" -Recurse -ErrorAction Ignore - # NOTE: DELETE THIS COMMENT IF NOT USED - # Move single binary into root of temporary folder - #& move "$pkg_download" "chromedriver.exe" + # NOTE: DELETE THIS COMMENT IF NOT USED + # Move single binary into root of temporary folder + #& move "$pkg_download" "chromedriver.exe" - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\chromedriver-*\chromedriver.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\chromedriver-*\chromedriver.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/cmake/install.ps1 b/cmake/install.ps1 index bfe39d2..4a9f76c 100644 --- a/cmake/install.ps1 +++ b/cmake/install.ps1 @@ -16,41 +16,39 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\cmake-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\cmake-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading cmake from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_dir")) -{ +IF (!(Test-Path -Path "$pkg_src_dir")) { echo "Installing cmake" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\cmake*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\cmake*" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - Move-Item -Path ".\cmake*" -Destination "$pkg_src_dir" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + Move-Item -Path ".\cmake*" -Destination "$pkg_src_dir" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/comrak/install.ps1 b/comrak/install.ps1 index 79dba4e..7f0c369 100644 --- a/comrak/install.ps1 +++ b/comrak/install.ps1 @@ -3,32 +3,30 @@ $VERNAME = "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" $EXENAME = "$Env:PKG_NAME.exe" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" } -IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin\$VERNAME")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin\$VERNAME")) { echo "Installing $Env:PKG_NAME" # TODO: temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore - # Move single binary into root of temporary folder - & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "$VERNAME" + # Move single binary into root of temporary folder + & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "$VERNAME" - # Settle unpacked archive into place - echo "New Name: $VERNAME" - echo "New Location: $Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin\$VERNAME" - New-Item "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin" -ItemType Directory -Force | out-null - Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin" + # Settle unpacked archive into place + echo "New Name: $VERNAME" + echo "New Location: $Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin\$VERNAME" + New-Item "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin" -ItemType Directory -Force | Out-Null + Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin" # Exit tmp popd @@ -36,4 +34,4 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERS echo "Copying into '$Env:USERPROFILE\.local\bin\$EXENAME' from '$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin\$VERNAME'" Remove-Item -Path "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse -ErrorAction Ignore -Copy-Item -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse +Copy-Item -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION\bin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse \ No newline at end of file diff --git a/curlie/install.ps1 b/curlie/install.ps1 index 444c44f..1765602 100644 --- a/curlie/install.ps1 +++ b/curlie/install.ps1 @@ -3,36 +3,34 @@ $VERNAME = "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" $EXENAME = "$Env:PKG_NAME.exe" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" } -IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) { echo "Installing $Env:PKG_NAME" # TODO: temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore - # Unpack archive - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - # Move single binary into root of temporary folder - & move "$EXENAME" "$VERNAME" + # Unpack archive + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + # Move single binary into root of temporary folder + & move "$EXENAME" "$VERNAME" - # Settle unpacked archive into place - echo "New Name: $VERNAME" - echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" - Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" + # Settle unpacked archive into place + echo "New Name: $VERNAME" + echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" + Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" # Exit tmp popd @@ -40,4 +38,4 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) echo "Copying into '$Env:USERPROFILE\.local\bin\$EXENAME' from '$Env:USERPROFILE\.local\xbin\$VERNAME'" Remove-Item -Path "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse -ErrorAction Ignore -Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse +Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse \ No newline at end of file diff --git a/dashcore/install.ps1 b/dashcore/install.ps1 index b970d72..571f912 100644 --- a/dashcore/install.ps1 +++ b/dashcore/install.ps1 @@ -16,41 +16,39 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading dashcore from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_dir")) -{ +IF (!(Test-Path -Path "$pkg_src_dir")) { echo "Installing dashcore" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\dashcore*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\dashcore*" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - Move-Item -Path ".\dashcore*" -Destination "$pkg_src_dir" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + Move-Item -Path ".\dashcore*" -Destination "$pkg_src_dir" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/dashd/install.ps1 b/dashd/install.ps1 index 90aaecc..2aa15d9 100644 --- a/dashd/install.ps1 +++ b/dashd/install.ps1 @@ -16,41 +16,39 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\dashcore-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading dashd from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_dir")) -{ +IF (!(Test-Path -Path "$pkg_src_dir")) { echo "Installing dashd" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\dashcore*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\dashcore*" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - Move-Item -Path ".\dashcore*" -Destination "$pkg_src_dir" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + Move-Item -Path ".\dashcore*" -Destination "$pkg_src_dir" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/dashmsg/install.ps1 b/dashmsg/install.ps1 index bb07e89..2db37ff 100644 --- a/dashmsg/install.ps1 +++ b/dashmsg/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\dashmsg-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\dashmsg-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading dashmsg from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing dashmsg" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\dashmsg-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\dashmsg.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\dashmsg-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\dashmsg.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\dashmsg.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\dashmsg.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/delta/install.ps1 b/delta/install.ps1 index ee1ffbf..8638fb9 100644 --- a/delta/install.ps1 +++ b/delta/install.ps1 @@ -15,51 +15,49 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\delta-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\delta-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading delta from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing delta" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\delta-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\delta.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\delta-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\delta.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\delta-*\delta.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\delta-*\delta.exe" -Destination "$pkg_src_bin" - # set delta to be the default differ - git config --global page.diff delta - git config --global page.show delta - git config --global page.log delta - git config --global page.blame delta - git config --global page.reflog delta + # set delta to be the default differ + git config --global page.diff delta + git config --global page.show delta + git config --global page.log delta + git config --global page.blame delta + git config --global page.reflog delta - git config --global interactive.diffFilter 'delta --color-only' + git config --global interactive.diffFilter 'delta --color-only' # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/deno/install.ps1 b/deno/install.ps1 index ae0e903..f0092f9 100644 --- a/deno/install.ps1 +++ b/deno/install.ps1 @@ -1,35 +1,33 @@ #!/usr/bin/env pwsh # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" #Invoke-WebRequest https://nodejs.org/dist/v12.16.2/node-v12.16.2-win-x64.zip -OutFile node-v12.16.2-win-x64.zip & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" } -IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION")) { echo "Installing $Env:PKG_NAME" # TODO: temp directory # Enter opt pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "deno-v*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "deno-v*" -Recurse -ErrorAction Ignore - # Unpack archive - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + # Unpack archive + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - # Settle unpacked archive into place - echo "New Name: $Env:PKG_NAME-v$Env:WEBI_VERSION" - Get-ChildItem "deno*" | Select -f 1 | Rename-Item -NewName "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" - echo "New Location: $Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" - Move-Item -Path "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" -Destination "$Env:USERPROFILE\.local\opt" + # Settle unpacked archive into place + echo "New Name: $Env:PKG_NAME-v$Env:WEBI_VERSION" + Get-ChildItem "deno*" | select -f 1 | Rename-Item -NewName "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" + echo "New Location: $Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" + Move-Item -Path "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" -Destination "$Env:USERPROFILE\.local\opt" # Exit tmp popd @@ -37,4 +35,4 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERS echo "Copying into '$Env:USERPROFILE\.local\bin\$Env:PKG_NAME.exe' from '$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION.exe'" Remove-Item -Path "$Env:USERPROFILE\.local\bin\$Env:PKG_NAME.exe" -Recurse -ErrorAction Ignore -Copy-Item -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" -Destination "$Env:USERPROFILE\.local\bin\$Env:PKG_NAME.exe" -Recurse +Copy-Item -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" -Destination "$Env:USERPROFILE\.local\bin\$Env:PKG_NAME.exe" -Recurse \ No newline at end of file diff --git a/dotenv-linter/install.ps1 b/dotenv-linter/install.ps1 index 2c53297..132c8b4 100644 --- a/dotenv-linter/install.ps1 +++ b/dotenv-linter/install.ps1 @@ -15,50 +15,47 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\dotenv-linter-v$Env:WEBI_VERSION\bin $pkg_src_dir = "$Env:USERPROFILE\.local\opt\dotenv-linter-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch MSVC Runtime echo "Checking for MSVC Runtime..." -IF (-not (Test-Path "\Windows\System32\vcruntime140.dll")) -{ +IF (-not (Test-Path "\Windows\System32\vcruntime140.dll")) { & "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" vcruntime } # Fetch archive -IF (!(Test-Path -Path "$pkg_download")) -{ +IF (!(Test-Path -Path "$pkg_download")) { echo "Downloading dotenv-linter from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing dotenv-linter" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\dotenv-linter-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\dotenv-linter.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\dotenv-linter-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\dotenv-linter.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\dotenv-linter.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\dotenv-linter.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/dotenv/install.ps1 b/dotenv/install.ps1 index b13dd78..c9b1983 100644 --- a/dotenv/install.ps1 +++ b/dotenv/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\dotenv-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\dotenv-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading dotenv from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing dotenv" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\dotenv-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\dotenv.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\dotenv-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\dotenv.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\dotenv.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\dotenv.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/fd/install.ps1 b/fd/install.ps1 index 444c44f..1765602 100644 --- a/fd/install.ps1 +++ b/fd/install.ps1 @@ -3,36 +3,34 @@ $VERNAME = "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" $EXENAME = "$Env:PKG_NAME.exe" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" } -IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) { echo "Installing $Env:PKG_NAME" # TODO: temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore - # Unpack archive - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - # Move single binary into root of temporary folder - & move "$EXENAME" "$VERNAME" + # Unpack archive + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + # Move single binary into root of temporary folder + & move "$EXENAME" "$VERNAME" - # Settle unpacked archive into place - echo "New Name: $VERNAME" - echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" - Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" + # Settle unpacked archive into place + echo "New Name: $VERNAME" + echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" + Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" # Exit tmp popd @@ -40,4 +38,4 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) echo "Copying into '$Env:USERPROFILE\.local\bin\$EXENAME' from '$Env:USERPROFILE\.local\xbin\$VERNAME'" Remove-Item -Path "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse -ErrorAction Ignore -Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse +Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse \ No newline at end of file diff --git a/ffmpeg/install.ps1 b/ffmpeg/install.ps1 index ac93ca1..15d0a31 100644 --- a/ffmpeg/install.ps1 +++ b/ffmpeg/install.ps1 @@ -15,37 +15,35 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\ffmpeg-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\ffmpeg-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading ffmpeg from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" Move-Item -Path "$pkg_download.part" -Destination "$pkg_download" -Force } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing ffmpeg" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\win32-*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\win32-*" -Recurse -ErrorAction Ignore - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path "$pkg_download" -Destination "$pkg_src_cmd" -Force + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path "$pkg_download" -Destination "$pkg_src_cmd" -Force # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/ffuf/install.ps1 b/ffuf/install.ps1 index 59e67ff..e80aff8 100644 --- a/ffuf/install.ps1 +++ b/ffuf/install.ps1 @@ -16,48 +16,46 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\ffuf-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\ffuf-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (-Not (Test-Path -Path "$pkg_download")) -{ +IF (-Not (Test-Path -Path "$pkg_download")) { echo "Downloading ffuf from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (-Not (Test-Path -Path "$pkg_src_cmd")) -{ +IF (-Not (Test-Path -Path "$pkg_src_cmd")) { echo "Installing ffuf" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\ffuf-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\ffuf.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\ffuf-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\ffuf.exe" -Recurse -ErrorAction Ignore - # NOTE: DELETE THIS COMMENT IF NOT USED - # Move single binary into root of temporary folder - #& move "$pkg_download" "ffuf.exe" + # NOTE: DELETE THIS COMMENT IF NOT USED + # Move single binary into root of temporary folder + #& move "$pkg_download" "ffuf.exe" - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\ffuf.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\ffuf.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +New-Item "$pkg_dst_bin" -ItemType Directory -Force | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/fzf/install.ps1 b/fzf/install.ps1 index 444c44f..1765602 100644 --- a/fzf/install.ps1 +++ b/fzf/install.ps1 @@ -3,36 +3,34 @@ $VERNAME = "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" $EXENAME = "$Env:PKG_NAME.exe" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" } -IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) { echo "Installing $Env:PKG_NAME" # TODO: temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore - # Unpack archive - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - # Move single binary into root of temporary folder - & move "$EXENAME" "$VERNAME" + # Unpack archive + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + # Move single binary into root of temporary folder + & move "$EXENAME" "$VERNAME" - # Settle unpacked archive into place - echo "New Name: $VERNAME" - echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" - Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" + # Settle unpacked archive into place + echo "New Name: $VERNAME" + echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" + Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" # Exit tmp popd @@ -40,4 +38,4 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) echo "Copying into '$Env:USERPROFILE\.local\bin\$EXENAME' from '$Env:USERPROFILE\.local\xbin\$VERNAME'" Remove-Item -Path "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse -ErrorAction Ignore -Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse +Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse \ No newline at end of file diff --git a/gh/install.ps1 b/gh/install.ps1 index b877eea..d6a7d61 100644 --- a/gh/install.ps1 +++ b/gh/install.ps1 @@ -15,47 +15,45 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\gh-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\gh-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading gh from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing gh" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\gh-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\gh.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\gh-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\gh.exe" -Recurse -ErrorAction Ignore - # NOTE: DELETE THIS COMMENT IF NOT USED - # Move single binary into root of temporary folder - #& move "$pkg_download" "gh.exe" + # NOTE: DELETE THIS COMMENT IF NOT USED + # Move single binary into root of temporary folder + #& move "$pkg_download" "gh.exe" - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\bin\gh.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\bin\gh.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/git-gpg-init/install.ps1 b/git-gpg-init/install.ps1 index 075a61b..8099fd7 100644 --- a/git-gpg-init/install.ps1 +++ b/git-gpg-init/install.ps1 @@ -2,4 +2,4 @@ echo "'git-gpg-init@$Env:WEBI_TAG' is an alias for 'git-config-gpg@$Env:WEBI_VERSION'" IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } -curl.exe -fsSL "$Env:WEBI_HOST/git-config-gpg@$Env:WEBI_VERSION" | powershell +curl.exe -fsSL "$Env:WEBI_HOST/git-config-gpg@$Env:WEBI_VERSION" | powershell \ No newline at end of file diff --git a/git/install.ps1 b/git/install.ps1 index d44ba68..235d889 100644 --- a/git/install.ps1 +++ b/git/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh $pkg_cmd_name = "git" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" $pkg_src = "$Env:USERPROFILE\.local\opt\$pkg_cmd_name-v$Env:WEBI_VERSION" @@ -11,38 +11,36 @@ $pkg_dst_cmd = "$pkg_dst\cmd\$pkg_cmd_name" $pkg_dst_bin = "$pkg_dst\cmd" # Fetch archive -IF (!(Test-Path -Path "$pkg_download")) -{ +IF (!(Test-Path -Path "$pkg_download")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src")) -{ +IF (!(Test-Path -Path "$pkg_src")) { echo "Installing $pkg_cmd_name" # TODO: temp directory # Enter opt - ($none = pushd .local\tmp) | out-null + ($none = pushd .local\tmp) | Out-Null - # Remove any leftover tmp cruft - Remove-Item -Path "$pkg_cmd_name*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "$pkg_cmd_name*" -Recurse -ErrorAction Ignore - # Unpack archive - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - IF (!(Test-Path -Path "$pkg_cmd_name-v$Env:WEBI_VERSION")) { - New-Item -Path "$pkg_cmd_name-v$Env:WEBI_VERSION" -ItemType Directory -Force | out-null - } - ($none = pushd "$pkg_cmd_name-v$Env:WEBI_VERSION") | out-null - & tar xf "$pkg_download" - ($none = popd) | out-null + # Unpack archive + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + IF (!(Test-Path -Path "$pkg_cmd_name-v$Env:WEBI_VERSION")) { + New-Item -Path "$pkg_cmd_name-v$Env:WEBI_VERSION" -ItemType Directory -Force | Out-Null + } + ($none = pushd "$pkg_cmd_name-v$Env:WEBI_VERSION") | Out-Null + & tar xf "$pkg_download" + ($none = popd) | Out-Null - # Settle unpacked archive into place - echo "New Name: $pkg_cmd_name-v$Env:WEBI_VERSION" - echo "New Location: $pkg_src" - Move-Item -Path "$pkg_cmd_name-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt" + # Settle unpacked archive into place + echo "New Name: $pkg_cmd_name-v$Env:WEBI_VERSION" + echo "New Location: $pkg_src" + Move-Item -Path "$pkg_cmd_name-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt" # Exit tmp $none = popd @@ -53,4 +51,4 @@ Remove-Item -Path "$pkg_dst" -Recurse -ErrorAction Ignore Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse # Add to path -webi_path_add ~/.local/opt/git/cmd +webi_path_add ~/.local/opt/git/cmd \ No newline at end of file diff --git a/gitdeploy/install.ps1 b/gitdeploy/install.ps1 index 34f94d9..cfa2665 100644 --- a/gitdeploy/install.ps1 +++ b/gitdeploy/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\gitdeploy-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\gitdeploy-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading gitdeploy from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing gitdeploy" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\gitdeploy-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\gitdeploy.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\gitdeploy-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\gitdeploy.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\gitdeploy.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\gitdeploy.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/gitea/install.ps1 b/gitea/install.ps1 index b00ca9f..6eec15a 100644 --- a/gitea/install.ps1 +++ b/gitea/install.ps1 @@ -15,41 +15,39 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\gitea-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\gitea-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading gitea from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing gitea" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\gitea-*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\gitea.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\gitea-*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\gitea.exe" -Recurse -ErrorAction Ignore - # Move single binary into root of temporary folder - & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "gitea.exe" + # Move single binary into root of temporary folder + & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "gitea.exe" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path "gitea.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path "gitea.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/go-essentials/install.ps1 b/go-essentials/install.ps1 index 9a6d5bf..fcde34f 100644 --- a/go-essentials/install.ps1 +++ b/go-essentials/install.ps1 @@ -1,7 +1,6 @@ #!/usr/bin/env pwsh -if (!(Get-Command "go.exe" -ErrorAction SilentlyContinue)) -{ +if (!(Get-Command "go.exe" -ErrorAction SilentlyContinue)) { & "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" go # because we need git.exe to be available to golang immediately $Env:PATH = "$Env:USERPROFILE\go\bin;$Env:USERPROFILE\.local\opt\go\bin;$Env:PATH" @@ -63,4 +62,4 @@ echo "Suggestion: Also check out these great productivity multipliers:" echo "" echo " - vim-essentials (sensible defaults for vim)" echo " - vim-go (golang linting, etc)" -echo "" +echo "" \ No newline at end of file diff --git a/go/install.ps1 b/go/install.ps1 index 0e3d1f2..12b397c 100644 --- a/go/install.ps1 +++ b/go/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh $pkg_cmd_name = "go" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" $pkg_src = "$Env:USERPROFILE\.local\opt\$pkg_cmd_name-v$Env:WEBI_VERSION" @@ -10,42 +10,39 @@ $pkg_dst = "$Env:USERPROFILE\.local\opt\$pkg_cmd_name" $pkg_dst_cmd = "$pkg_dst\bin\$pkg_cmd_name" $pkg_dst_bin = "$pkg_dst\bin" -if (!(Get-Command "git.exe" -ErrorAction SilentlyContinue)) -{ +if (!(Get-Command "git.exe" -ErrorAction SilentlyContinue)) { & "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" git # because we need git.exe to be available to golang immediately $Env:PATH = "$Env:USERPROFILE\.local\opt\git\cmd;$Env:PATH" } # Fetch archive -IF (!(Test-Path -Path "$pkg_download")) -{ +IF (!(Test-Path -Path "$pkg_download")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src")) -{ +IF (!(Test-Path -Path "$pkg_src")) { echo "Installing $pkg_cmd_name" # TODO: temp directory # Enter opt pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "$pkg_cmd_name*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "$pkg_cmd_name*" -Recurse -ErrorAction Ignore - # Unpack archive - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "New Name: $pkg_cmd_name-v$Env:WEBI_VERSION" - Get-ChildItem "$pkg_cmd_name*" | Select -f 1 | Rename-Item -NewName "$pkg_cmd_name-v$Env:WEBI_VERSION" - echo "New Location: $pkg_src" - Move-Item -Path "$pkg_cmd_name-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt" + # Settle unpacked archive into place + echo "New Name: $pkg_cmd_name-v$Env:WEBI_VERSION" + Get-ChildItem "$pkg_cmd_name*" | select -f 1 | Rename-Item -NewName "$pkg_cmd_name-v$Env:WEBI_VERSION" + echo "New Location: $pkg_src" + Move-Item -Path "$pkg_cmd_name-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt" # Exit tmp popd @@ -54,10 +51,10 @@ IF (!(Test-Path -Path "$pkg_src")) echo "Copying into '$pkg_dst' from '$pkg_src'" Remove-Item -Path "$pkg_dst" -Recurse -ErrorAction Ignore Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse -IF (!(Test-Path -Path go\bin)) { New-Item -Path go\bin -ItemType Directory -Force | out-null } +IF (!(Test-Path -Path go\bin)) { New-Item -Path go\bin -ItemType Directory -Force | Out-Null } # Add to path webi_path_add ~/.local/opt/go/bin # Special to go: add default GOBIN to PATH -webi_path_add ~/go/bin +webi_path_add ~/go/bin \ No newline at end of file diff --git a/golang/install.ps1 b/golang/install.ps1 index 0e3d1f2..12b397c 100644 --- a/golang/install.ps1 +++ b/golang/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh $pkg_cmd_name = "go" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" $pkg_src = "$Env:USERPROFILE\.local\opt\$pkg_cmd_name-v$Env:WEBI_VERSION" @@ -10,42 +10,39 @@ $pkg_dst = "$Env:USERPROFILE\.local\opt\$pkg_cmd_name" $pkg_dst_cmd = "$pkg_dst\bin\$pkg_cmd_name" $pkg_dst_bin = "$pkg_dst\bin" -if (!(Get-Command "git.exe" -ErrorAction SilentlyContinue)) -{ +if (!(Get-Command "git.exe" -ErrorAction SilentlyContinue)) { & "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" git # because we need git.exe to be available to golang immediately $Env:PATH = "$Env:USERPROFILE\.local\opt\git\cmd;$Env:PATH" } # Fetch archive -IF (!(Test-Path -Path "$pkg_download")) -{ +IF (!(Test-Path -Path "$pkg_download")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src")) -{ +IF (!(Test-Path -Path "$pkg_src")) { echo "Installing $pkg_cmd_name" # TODO: temp directory # Enter opt pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "$pkg_cmd_name*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "$pkg_cmd_name*" -Recurse -ErrorAction Ignore - # Unpack archive - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "New Name: $pkg_cmd_name-v$Env:WEBI_VERSION" - Get-ChildItem "$pkg_cmd_name*" | Select -f 1 | Rename-Item -NewName "$pkg_cmd_name-v$Env:WEBI_VERSION" - echo "New Location: $pkg_src" - Move-Item -Path "$pkg_cmd_name-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt" + # Settle unpacked archive into place + echo "New Name: $pkg_cmd_name-v$Env:WEBI_VERSION" + Get-ChildItem "$pkg_cmd_name*" | select -f 1 | Rename-Item -NewName "$pkg_cmd_name-v$Env:WEBI_VERSION" + echo "New Location: $pkg_src" + Move-Item -Path "$pkg_cmd_name-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt" # Exit tmp popd @@ -54,10 +51,10 @@ IF (!(Test-Path -Path "$pkg_src")) echo "Copying into '$pkg_dst' from '$pkg_src'" Remove-Item -Path "$pkg_dst" -Recurse -ErrorAction Ignore Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse -IF (!(Test-Path -Path go\bin)) { New-Item -Path go\bin -ItemType Directory -Force | out-null } +IF (!(Test-Path -Path go\bin)) { New-Item -Path go\bin -ItemType Directory -Force | Out-Null } # Add to path webi_path_add ~/.local/opt/go/bin # Special to go: add default GOBIN to PATH -webi_path_add ~/go/bin +webi_path_add ~/go/bin \ No newline at end of file diff --git a/goreleaser/install.ps1 b/goreleaser/install.ps1 index 7086492..9d6516e 100644 --- a/goreleaser/install.ps1 +++ b/goreleaser/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\goreleaser-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\goreleaser-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading goreleaser from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing goreleaser" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\goreleaser-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\goreleaser.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\goreleaser-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\goreleaser.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\goreleaser.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\goreleaser.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/gpg-pubkey/gpg-pubkey-id.ps1 b/gpg-pubkey/gpg-pubkey-id.ps1 index b15d700..635e576 100644 --- a/gpg-pubkey/gpg-pubkey-id.ps1 +++ b/gpg-pubkey/gpg-pubkey-id.ps1 @@ -5,4 +5,4 @@ gpg --list-secret-keys --keyid-format LONG | Select-Object Line | ForEach-Object { $_.Line.split('/')[1].split(' ')[0] - } + } \ No newline at end of file diff --git a/gpg-pubkey/gpg-pubkey.ps1 b/gpg-pubkey/gpg-pubkey.ps1 index 88a8843..0808afa 100644 --- a/gpg-pubkey/gpg-pubkey.ps1 +++ b/gpg-pubkey/gpg-pubkey.ps1 @@ -7,8 +7,7 @@ $my_key_id = gpg --list-secret-keys --keyid-format LONG | $_.Line.split('/')[1].split(' ')[0] } -if (!$my_key_id) -{ +if (!$my_key_id) { $my_name = git config --global user.name $my_email = git config --global user.email $my_host = hostname @@ -38,4 +37,4 @@ echo "" echo "~/$my_asc_relpath": echo "" & type "$Env:USERPROFILE/$my_asc_relpath" -echo "" +echo "" \ No newline at end of file diff --git a/gpg-pubkey/install.ps1 b/gpg-pubkey/install.ps1 index 79aeb14..9e23748 100644 --- a/gpg-pubkey/install.ps1 +++ b/gpg-pubkey/install.ps1 @@ -40,4 +40,4 @@ if (!$gpg_exists) { # # run gpg-pubkey # -& "$Env:USERPROFILE\.local\bin\$MY_CMD.bat" +& "$Env:USERPROFILE\.local\bin\$MY_CMD.bat" \ No newline at end of file diff --git a/gpg/install.ps1 b/gpg/install.ps1 index d4dbf97..6cff444 100644 --- a/gpg/install.ps1 +++ b/gpg/install.ps1 @@ -3,4 +3,4 @@ echo "We don't yet have a way to automate the GnuPG Tools installer at the user level. In the meantime, try this:" echo "" echo " https://gnupg.org/download/#binary" -echo "" +echo "" \ No newline at end of file diff --git a/gprox/install.ps1 b/gprox/install.ps1 index bc2fca2..502255a 100644 --- a/gprox/install.ps1 +++ b/gprox/install.ps1 @@ -15,47 +15,45 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\gprox-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\gprox-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading gprox from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing gprox" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\gprox-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\gprox.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\gprox-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\gprox.exe" -Recurse -ErrorAction Ignore - # NOTE: DELETE THIS COMMENT IF NOT USED - # Move single binary into root of temporary folder - #& move "$pkg_download" "gprox.exe" + # NOTE: DELETE THIS COMMENT IF NOT USED + # Move single binary into root of temporary folder + #& move "$pkg_download" "gprox.exe" - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory - Move-Item -Path ".\gprox-*\gprox.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory + Move-Item -Path ".\gprox-*\gprox.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/grype/install.ps1 b/grype/install.ps1 index 5ca5fca..9907778 100644 --- a/grype/install.ps1 +++ b/grype/install.ps1 @@ -16,19 +16,17 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\grype-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\grype-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading grype from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing grype" # TODO: create package-specific temp directory @@ -46,7 +44,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) # Settle unpacked archive into place echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null Move-Item -Path ".\grype.exe" -Destination "$pkg_src_bin" # Exit tmp @@ -54,6 +52,6 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +New-Item "$pkg_dst_bin" -ItemType Directory -Force | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/hugo-extended/install.ps1 b/hugo-extended/install.ps1 index d2daaa8..46962d0 100644 --- a/hugo-extended/install.ps1 +++ b/hugo-extended/install.ps1 @@ -16,7 +16,7 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\hugo-extended-v$Env:WEBI_VERSION\bin $pkg_src_dir = "$Env:USERPROFILE\.local\opt\hugo-extended-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive @@ -44,7 +44,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { # Settle unpacked archive into place echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null Move-Item -Path ".\hugo.exe" -Destination "$pkg_src_bin" # Exit tmp @@ -52,6 +52,6 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +New-Item "$pkg_dst_bin" -ItemType Directory -Force | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/hugo/install.ps1 b/hugo/install.ps1 index caec484..d923046 100644 --- a/hugo/install.ps1 +++ b/hugo/install.ps1 @@ -16,7 +16,7 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\hugo-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\hugo-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive @@ -44,7 +44,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { # Settle unpacked archive into place echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null Move-Item -Path ".\hugo.exe" -Destination "$pkg_src_bin" # Exit tmp @@ -52,6 +52,6 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +New-Item "$pkg_dst_bin" -ItemType Directory -Force | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/jq/install.ps1 b/jq/install.ps1 index 0056841..0f46187 100644 --- a/jq/install.ps1 +++ b/jq/install.ps1 @@ -3,33 +3,31 @@ $VERNAME = "$Env:PKG_NAME-v$Env:WEBI_VERSION.exe" $EXENAME = "$Env:PKG_NAME.exe" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" } -IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) { echo "Installing $Env:PKG_NAME" # TODO: temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "$Env:PKG_NAME-v*" -Recurse -ErrorAction Ignore - # Move single binary into temporary folder - echo "Moving $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "$VERNAME" + # Move single binary into temporary folder + echo "Moving $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "$VERNAME" - # Settle unpacked archive into place - echo "New Name: $VERNAME" - Get-ChildItem "$Env:PKG_NAME-v*" | Select -f 1 | Rename-Item -NewName "$VERNAME" - echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" - Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" + # Settle unpacked archive into place + echo "New Name: $VERNAME" + Get-ChildItem "$Env:PKG_NAME-v*" | select -f 1 | Rename-Item -NewName "$VERNAME" + echo "New Location: $Env:USERPROFILE\.local\xbin\$VERNAME" + Move-Item -Path "$VERNAME" -Destination "$Env:USERPROFILE\.local\xbin" # Exit tmp popd @@ -37,4 +35,4 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\.local\xbin\$VERNAME")) echo "Copying into '$Env:USERPROFILE\.local\bin\$EXENAME' from '$Env:USERPROFILE\.local\xbin\$VERNAME'" Remove-Item -Path "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse -ErrorAction Ignore -Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse +Copy-Item -Path "$Env:USERPROFILE\.local\xbin\$VERNAME" -Destination "$Env:USERPROFILE\.local\bin\$EXENAME" -Recurse \ No newline at end of file diff --git a/k9s/install.ps1 b/k9s/install.ps1 index d550ee7..bcbfc5d 100644 --- a/k9s/install.ps1 +++ b/k9s/install.ps1 @@ -15,44 +15,42 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\k9s-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\k9s-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading k9s from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing k9s" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\k9s-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\k9s.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\k9s-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\k9s.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path "k9s.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path "k9s.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse -Remove-Item -Path "$pkg_src" -Recurse -ErrorAction Ignore +Remove-Item -Path "$pkg_src" -Recurse -ErrorAction Ignore \ No newline at end of file diff --git a/keypairs/install.ps1 b/keypairs/install.ps1 index dcf6d6b..547e4fa 100644 --- a/keypairs/install.ps1 +++ b/keypairs/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\keypairs-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\keypairs-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading keypairs from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing keypairs" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\keypairs-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\keypairs.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\keypairs-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\keypairs.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\keypairs.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\keypairs.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/kind/install.ps1 b/kind/install.ps1 index 85380a5..f5357ac 100644 --- a/kind/install.ps1 +++ b/kind/install.ps1 @@ -14,34 +14,32 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\kind-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\kind-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading kind from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing kind" pushd .local\tmp - Remove-Item -Path ".\kind-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\kind.exe" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\kind-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\kind.exe" -Recurse -ErrorAction Ignore - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force - Move-Item -Path ".\kind-*\kind.exe" -Destination "$pkg_src_bin" + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force + Move-Item -Path ".\kind-*\kind.exe" -Destination "$pkg_src_bin" popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/kubectx/install.ps1 b/kubectx/install.ps1 index 16ccaf7..c068b18 100644 --- a/kubectx/install.ps1 +++ b/kubectx/install.ps1 @@ -15,44 +15,42 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\kubectx-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\kubectx-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading kubectx from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing kubectx" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\kubectx-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\kubectx.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\kubectx-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\kubectx.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path "kubectx.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path "kubectx.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse -Remove-Item -Path "$pkg_src" -Recurse -ErrorAction Ignore +Remove-Item -Path "$pkg_src" -Recurse -ErrorAction Ignore \ No newline at end of file diff --git a/kubens/install.ps1 b/kubens/install.ps1 index 29d54ce..56dd5e2 100644 --- a/kubens/install.ps1 +++ b/kubens/install.ps1 @@ -15,44 +15,42 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\kubens-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\kubens-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading kubens from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing kubens" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\kubens-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\kubens.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\kubens-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\kubens.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path "kubens.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path "kubens.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse -Remove-Item -Path "$pkg_src" -Recurse -ErrorAction Ignore +Remove-Item -Path "$pkg_src" -Recurse -ErrorAction Ignore \ No newline at end of file diff --git a/lf/install.ps1 b/lf/install.ps1 index d9669d0..020f637 100644 --- a/lf/install.ps1 +++ b/lf/install.ps1 @@ -14,34 +14,32 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\lf-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\lf-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading lf from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing lf" pushd .local\tmp - Remove-Item -Path ".\lf.exe" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\lf.exe" -Recurse -ErrorAction Ignore - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\lf.exe" -Destination "$pkg_src_bin" + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\lf.exe" -Destination "$pkg_src_bin" popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/lsd/install.ps1 b/lsd/install.ps1 index 738e00b..fad44d3 100644 --- a/lsd/install.ps1 +++ b/lsd/install.ps1 @@ -15,44 +15,42 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\lsd-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\lsd-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading lsd from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing lsd" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\lsd-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\lsd.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\lsd-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\lsd.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\lsd-*\lsd.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\lsd-*\lsd.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/mutagen/install.ps1 b/mutagen/install.ps1 index 557426d..d1b9a19 100644 --- a/mutagen/install.ps1 +++ b/mutagen/install.ps1 @@ -14,34 +14,32 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\mutagen-v$Env:WEBI_VERSION" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\mutagen-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading mutagen from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing mutagen" pushd .local\tmp - Remove-Item -Path ".\mutagen.exe" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\mutagen.exe" -Recurse -ErrorAction Ignore - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_dir" -ItemType Directory -Force | out-null - Move-Item -Path ".\*" -Destination "$pkg_src_dir" + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_dir" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\*" -Destination "$pkg_src_dir" popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/myip/install.ps1 b/myip/install.ps1 index a6a8e18..aed5c2d 100644 --- a/myip/install.ps1 +++ b/myip/install.ps1 @@ -4,4 +4,4 @@ Remove-Item -Path "$Env:USERPROFILE\.local\bin\myip.ps1" -Recurse -ErrorAction Ignore & move "$Env:USERPROFILE\.local\bin\myip.ps1.part" "$Env:USERPROFILE\.local\bin\myip.ps1" Set-Content -Path "$Env:USERPROFILE\.local\bin\myip.bat" -Value "@echo off`r`npushd %USERPROFILE%`r`npowershell -ExecutionPolicy Bypass .local\bin\myip.ps1 %1`r`npopd" -& "$Env:USERPROFILE\.local\bin\myip.bat" +& "$Env:USERPROFILE\.local\bin\myip.bat" \ No newline at end of file diff --git a/myip/myip.ps1 b/myip/myip.ps1 index 0d3c744..2238528 100644 --- a/myip/myip.ps1 +++ b/myip/myip.ps1 @@ -2,14 +2,12 @@ $ipv4 = curl.exe -sf https://api.ipify.org -IF(!($ipv4 -eq $null -or $ipv4 -eq "")) -{ +IF (!($ipv4 -eq $null -or $ipv4 -eq "")) { echo "IPv4 (A) : $ipv4" } $ipv6 = curl.exe -sf https://api6.ipify.org -IF(!($ipv6 -eq $null -or $ipv6 -eq "")) -{ +IF (!($ipv6 -eq $null -or $ipv6 -eq "")) { echo "IPv6 (AAAA): $ipv6" -} +} \ No newline at end of file diff --git a/nerdfont/install.ps1 b/nerdfont/install.ps1 index d5e631c..3438140 100644 --- a/nerdfont/install.ps1 +++ b/nerdfont/install.ps1 @@ -3,9 +3,8 @@ $my_nerdfont_otf = "Droid Sans Mono for Powerline Nerd Font Complete Windows Compatible.otf" $my_fontdir = "$Env:UserProfile\AppData\Local\Microsoft\Windows\Fonts" -New-Item -Path "$my_fontdir" -ItemType Directory -Force | out-null -IF (!(Test-Path -Path "$my_fontdir\$my_nerdfont_otf")) -{ +New-Item -Path "$my_fontdir" -ItemType Directory -Force | Out-Null +IF (!(Test-Path -Path "$my_fontdir\$my_nerdfont_otf")) { & curl.exe -fsSLo "$my_nerdfont_otf" 'https://github.com/ryanoasis/nerd-fonts/raw/v2.3.3/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete%20Windows%20Compatible.otf' & move "$my_nerdfont_otf" "$my_fontdir" } @@ -16,7 +15,7 @@ pushd "$my_fontdir" $regFontPath = "\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" $fontRegistryPath = "HKCU:$regFontPath" $fontFiles = Get-ChildItem -Recurse -Include *.ttf, *.otf -foreach($font in $fontFiles) { +foreach ($font in $fontFiles) { # See https://github.com/PPOSHGROUP/PPoShTools/blob/master/PPoShTools/Public/FileSystem/Add-Font.ps1#L80 Add-Type -AssemblyName System.Drawing $objFontCollection = New-Object System.Drawing.Text.PrivateFontCollection @@ -33,4 +32,4 @@ foreach($font in $fontFiles) { & start $font.FullName echo "" echo "IMPORTANT: Click 'Install' to complete installation" -} +} \ No newline at end of file diff --git a/node/install.ps1 b/node/install.ps1 index f5c9872..fc42e93 100644 --- a/node/install.ps1 +++ b/node/install.ps1 @@ -1,36 +1,34 @@ #!/usr/bin/env pwsh # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading $Env:PKG_NAME from $Env:WEBI_PKG_URL to $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - New-Item -Path "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null #Invoke-WebRequest https://nodejs.org/dist/v12.16.2/node-v12.16.2-win-x64.zip -OutFile node-v12.16.2-win-x64.zip & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE.part" "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" } -IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION")) { echo "Installing $Env:PKG_NAME" # TODO: temp directory # Enter opt pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path "node-v*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path "node-v*" -Recurse -ErrorAction Ignore - # Unpack archive - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + # Unpack archive + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" + & tar xf "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" - # Settle unpacked archive into place - echo "New Name: $Env:PKG_NAME-v$Env:WEBI_VERSION" - Get-ChildItem "node-v*" | Select -f 1 | Rename-Item -NewName "$Env:PKG_NAME-v$Env:WEBI_VERSION" - echo "New Location: $Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION" - Move-Item -Path "$Env:PKG_NAME-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt" + # Settle unpacked archive into place + echo "New Name: $Env:PKG_NAME-v$Env:WEBI_VERSION" + Get-ChildItem "node-v*" | select -f 1 | Rename-Item -NewName "$Env:PKG_NAME-v$Env:WEBI_VERSION" + echo "New Location: $Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION" + Move-Item -Path "$Env:PKG_NAME-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt" # Exit tmp popd @@ -41,4 +39,4 @@ Remove-Item -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME" -Recurse -ErrorAct Copy-Item -Path "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME-v$Env:WEBI_VERSION" -Destination "$Env:USERPROFILE\.local\opt\$Env:PKG_NAME" -Recurse # Add to path -webi_path_add ~/.local/opt/node +webi_path_add ~/.local/opt/node \ No newline at end of file diff --git a/ots/install.ps1 b/ots/install.ps1 index 5af1548..86f591f 100644 --- a/ots/install.ps1 +++ b/ots/install.ps1 @@ -14,41 +14,39 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\ots-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\ots-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading ots from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing ots" pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\ots-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\ots.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\ots-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\ots.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\ots.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\ots.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/pandoc/install.ps1 b/pandoc/install.ps1 index d586aa0..cca8652 100644 --- a/pandoc/install.ps1 +++ b/pandoc/install.ps1 @@ -15,44 +15,42 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\pandoc-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\pandoc-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading pandoc from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing pandoc" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\pandoc-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\pandoc.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\pandoc-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\pandoc.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\pandoc-*\pandoc.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\pandoc-*\pandoc.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/pathman/install.ps1 b/pathman/install.ps1 index 866333c..7f5c92f 100644 --- a/pathman/install.ps1 +++ b/pathman/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\pathman-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\pathman-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading pathman from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing pathman" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\pathman-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\pathman.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\pathman-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\pathman.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\pathman-v*"-Destination "$pkg_src_cmd" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\pathman-v*"-Destination "$pkg_src_cmd" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/rclone/install.ps1 b/rclone/install.ps1 index fe87b79..df7e298 100644 --- a/rclone/install.ps1 +++ b/rclone/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\rclone-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\rclone-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading rclone from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing rclone" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\rclone-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\rclone.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\rclone-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\rclone.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\rclone-v*\rclone.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\rclone-v*\rclone.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/rg/install.ps1 b/rg/install.ps1 index 87905be..2f0dbf3 100644 --- a/rg/install.ps1 +++ b/rg/install.ps1 @@ -15,44 +15,42 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\ripgrep-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\ripgrep-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading ripgrep from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing ripgrep" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\ripgrep-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\rg.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\ripgrep-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\rg.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\ripgrep-*\rg.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\ripgrep-*\rg.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/ripgrep/install.ps1 b/ripgrep/install.ps1 index 078cf51..c7767ba 100644 --- a/ripgrep/install.ps1 +++ b/ripgrep/install.ps1 @@ -1,3 +1,3 @@ echo "'ripgrep@$Env:WEBI_TAG' is an alias for 'rg@$Env:WEBI_VERSION'" IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } -curl.exe -fsSL "$Env:WEBI_HOST/rg@$Env:WEBI_VERSION" | powershell +curl.exe -fsSL "$Env:WEBI_HOST/rg@$Env:WEBI_VERSION" | powershell \ No newline at end of file diff --git a/sass/install.ps1 b/sass/install.ps1 index c911d4f..dad376f 100644 --- a/sass/install.ps1 +++ b/sass/install.ps1 @@ -17,31 +17,29 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\dart-sass-v$Env:WEBI_VERSION" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\dart-sass-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_dir" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading sass (dart-sass) from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing sass (dart-sass)" pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\dart-sass-v*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\dart-sass-v*" -Recurse -ErrorAction Ignore - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null > $null - Move-Item -Path ".\dart-sass\*" -Destination "$pkg_src_dir" + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null > $null + Move-Item -Path ".\dart-sass\*" -Destination "$pkg_src_dir" # Exit tmp popd @@ -52,4 +50,4 @@ echo "Linking '$pkg_dst_dir' from '$pkg_src_dir'" New-Item -ItemType Junction -Path "$pkg_dst_dir" -Target "$pkg_src_dir" > $null # Add to path -webi_path_add ~/.local/opt/dart-sass +webi_path_add ~/.local/opt/dart-sass \ No newline at end of file diff --git a/sclient/install.ps1 b/sclient/install.ps1 index ecdd656..0a4596a 100644 --- a/sclient/install.ps1 +++ b/sclient/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\sclient-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\sclient-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading sclient from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing sclient" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\sclient-*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\sclient.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\sclient-*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\sclient.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\sclient.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\sclient.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/sd/install.ps1 b/sd/install.ps1 index 3592b0a..f4908f2 100644 --- a/sd/install.ps1 +++ b/sd/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\sd-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\sd-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading sd from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing sd" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\sd-*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\sd.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\sd-*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\sd.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path "b\*\release\sd.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path "b\*\release\sd.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/serviceman/install.ps1 b/serviceman/install.ps1 index 2b73c19..f9a644b 100644 --- a/serviceman/install.ps1 +++ b/serviceman/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\serviceman-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\serviceman-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading serviceman from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing serviceman" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\serviceman-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\serviceman.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\serviceman-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\serviceman.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\serviceman.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\serviceman.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/shellcheck/install.ps1 b/shellcheck/install.ps1 index c1c9220..43c1c08 100644 --- a/shellcheck/install.ps1 +++ b/shellcheck/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\shellcheck-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\shellcheck-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading shellcheck from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing shellcheck" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\shellcheck-v*" -Recurse -ErrorAction Ignore | out-null - Remove-Item -Path ".\shellcheck.exe" -Recurse -ErrorAction Ignore | out-null + # Remove any leftover tmp cruft + Remove-Item -Path ".\shellcheck-v*" -Recurse -ErrorAction Ignore | Out-Null + Remove-Item -Path ".\shellcheck.exe" -Recurse -ErrorAction Ignore | Out-Null - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\shellcheck*.exe" -Destination "$pkg_src_cmd" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\shellcheck*.exe" -Destination "$pkg_src_cmd" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/shfmt/install.ps1 b/shfmt/install.ps1 index 447d70d..140d7c7 100644 --- a/shfmt/install.ps1 +++ b/shfmt/install.ps1 @@ -14,36 +14,34 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\shfmt-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\shfmt-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading shfmt from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing shfmt" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Move single binary into root of temporary folder - & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "shfmt.exe" + # Move single binary into root of temporary folder + & move "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" "shfmt.exe" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path "shfmt.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path "shfmt.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/sqlpkg/install.ps1 b/sqlpkg/install.ps1 index 153956d..b71cba7 100644 --- a/sqlpkg/install.ps1 +++ b/sqlpkg/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\sqlpkg-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\sqlpkg-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading sqlpkg from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing sqlpkg" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\sqlpkg-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\sqlpkg.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\sqlpkg-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\sqlpkg.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\sqlpkg.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\sqlpkg.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/ssh-pubkey/install.ps1 b/ssh-pubkey/install.ps1 index b238da7..c6faa4b 100644 --- a/ssh-pubkey/install.ps1 +++ b/ssh-pubkey/install.ps1 @@ -8,4 +8,4 @@ Remove-Item -Path "$Env:USERPROFILE\.local\bin\$MY_CMD.ps1" -Recurse -ErrorActio Set-Content -Path "$Env:USERPROFILE\.local\bin\$MY_CMD.bat" -Value "@echo off`r`npushd %USERPROFILE%`r`npowershell -ExecutionPolicy Bypass .local\bin\$MY_CMD.ps1 %1`r`npopd" # run the command -& "$Env:USERPROFILE\.local\bin\$MY_CMD.bat" +& "$Env:USERPROFILE\.local\bin\$MY_CMD.bat" \ No newline at end of file diff --git a/ssh-pubkey/ssh-pubkey.ps1 b/ssh-pubkey/ssh-pubkey.ps1 index e86a858..6c38f20 100644 --- a/ssh-pubkey/ssh-pubkey.ps1 +++ b/ssh-pubkey/ssh-pubkey.ps1 @@ -3,15 +3,13 @@ # TODO: can we use some of this? # https://github.com/PowerShell/openssh-portable/blob/latestw_all/contrib/win32/openssh/FixUserFilePermissions.ps1 -if (!(Test-Path -Path "$Env:USERPROFILE/.ssh")) -{ - New-Item -Path "$Env:USERPROFILE/.ssh" -ItemType Directory -Force | out-null +if (!(Test-Path -Path "$Env:USERPROFILE/.ssh")) { + New-Item -Path "$Env:USERPROFILE/.ssh" -ItemType Directory -Force | Out-Null #& icacls "$Env:USERPROFILE/.ssh" /inheritance:r #& icacls "$Env:USERPROFILE/.ssh" /grant:r "$Env:USERNAME":"(F)" } -if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/config")) -{ +if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/config")) { New-Item -Path "$Env:USERPROFILE/.ssh/config" -ItemType "file" -Value "" #& icacls "$Env:USERPROFILE/.ssh/config" /inheritance:r #& icacls "$Env:USERPROFILE/.ssh/config" /grant:r "$Env:USERNAME":"(F)" @@ -24,14 +22,12 @@ if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/config")) # #& icacls "$Env:USERPROFILE/.ssh/authorized_keys" /grant:r "$Env:USERNAME":"(F)" #} -if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/id_rsa")) -{ +if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/id_rsa")) { & ssh-keygen -b 2048 -t rsa -f "$Env:USERPROFILE/.ssh/id_rsa" -q -N """" echo "" } -if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/id_rsa.pub")) -{ +if (!(Test-Path -Path "$Env:USERPROFILE/.ssh/id_rsa.pub")) { & ssh-keygen -y -f "$Env:USERPROFILE/.ssh/id_rsa" > "$Env:USERPROFILE/.ssh/id_rsa.pub" echo "" } @@ -43,4 +39,4 @@ echo "" #rm -f "$Env:USERPROFILE/Downloads/id_rsa.$Env:USERNAME.pub": Copy-Item -Path "$Env:USERPROFILE/.ssh/id_rsa.pub" -Destination "$Env:USERPROFILE/Downloads/id_rsa.$Env:USERNAME.pub" & type "$Env:USERPROFILE/Downloads/id_rsa.$Env:USERNAME.pub" -echo "" +echo "" \ No newline at end of file diff --git a/sttr/install.ps1 b/sttr/install.ps1 index 6c07abe..fcf9c6b 100644 --- a/sttr/install.ps1 +++ b/sttr/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\sttr-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\sttr-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading sttr from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing sttr" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\sttr-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\sttr.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\sttr-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\sttr.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\sttr.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\sttr.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/sudo/install.ps1 b/sudo/install.ps1 index d14df03..638ae0d 100644 --- a/sudo/install.ps1 +++ b/sudo/install.ps1 @@ -6,4 +6,4 @@ echo "Installing sudo.cmd..." Set-Content -Path .local\bin\sudo.cmd -Value "@echo off`r`npowershell -Command ""Start-Process cmd -Verb RunAs -ArgumentList '/c cd /d %CD% && %*'""`r`n@echo on" echo "Installed to '$Env:USERPROFILE\.local\bin\sudo.cmd'" -echo "" +echo "" \ No newline at end of file diff --git a/syncthing/install.ps1 b/syncthing/install.ps1 index ced22f3..8be99cb 100644 --- a/syncthing/install.ps1 +++ b/syncthing/install.ps1 @@ -15,43 +15,41 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\syncthing-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\syncthing-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading syncthing from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing syncthing" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\syncthing-*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\syncthing.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\syncthing-*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\syncthing.exe" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\syncthing*\syncthing.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\syncthing*\syncthing.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/terraform/install.ps1 b/terraform/install.ps1 index 98f84b9..423f930 100644 --- a/terraform/install.ps1 +++ b/terraform/install.ps1 @@ -16,7 +16,7 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\terraform-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\terraform-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive @@ -44,7 +44,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { # Settle unpacked archive into place echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null Move-Item -Path ".\terraform.exe" -Destination "$pkg_src_bin" # Exit tmp @@ -52,6 +52,6 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +New-Item "$pkg_dst_bin" -ItemType Directory -Force | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/vcruntime/install.ps1 b/vcruntime/install.ps1 index 2b21f75..6bad279 100644 --- a/vcruntime/install.ps1 +++ b/vcruntime/install.ps1 @@ -1,8 +1,8 @@ # This is the canonical CPU arch when the process is emulated $my_arch = "$Env:PROCESSOR_ARCHITEW6432" IF ($my_arch -eq $null -or $my_arch -eq "") { - # This is the canonical CPU arch when the process is native - $my_arch = "$Env:PROCESSOR_ARCHITECTURE" + # This is the canonical CPU arch when the process is native + $my_arch = "$Env:PROCESSOR_ARCHITECTURE" } IF ($my_arch -eq "AMD64") { # Because PowerShell isn't ARM yet. @@ -19,7 +19,8 @@ IF ($my_arch -eq "AMD64") { if (-not (Test-Path "$Env:USERPROFILE\Downloads\webi\vcredist.exe")) { IF ($my_arch -eq "ARM64") { curl.exe -o "$Env:USERPROFILE\Downloads\webi\vcredist.exe.part" -L https://aka.ms/vs/17/release/vc_redist.arm64.exe - } ELSE { + } + ELSE { curl.exe -o "$Env:USERPROFILE\Downloads\webi\vcredist.exe.part" -L https://aka.ms/vs/17/release/vc_redist.x64.exe } & move "$Env:USERPROFILE\Downloads\webi\vcredist.exe.part" "$Env:USERPROFILE\Downloads\webi\vcredist.exe" @@ -32,8 +33,9 @@ if (-not (Test-Path "\Windows\System32\vcruntime140.dll")) { echo "Installing Microsoft Visual C++ Redistributable (vcruntime140.dll)..." echo "" & "$Env:USERPROFILE\Downloads\webi\vcredist.exe" /install /quiet /passive /norestart -} ELSE { +} +ELSE { echo "" echo "Found Microsoft Visual C++ Redistributable (vcruntime140.dll)" echo "" -} +} \ No newline at end of file diff --git a/vim-airline-themes/install.ps1 b/vim-airline-themes/install.ps1 index f5f251f..87e7990 100644 --- a/vim-airline-themes/install.ps1 +++ b/vim-airline-themes/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\vim-airline-themes" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/vim-airline/vim-airline-themes.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-airline-themes" +& git clone --depth=1 https://github.com/vim-airline/vim-airline-themes.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-airline-themes" \ No newline at end of file diff --git a/vim-airline/install.ps1 b/vim-airline/install.ps1 index 6a822cf..42fec5b 100644 --- a/vim-airline/install.ps1 +++ b/vim-airline/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\vim-airline" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/vim-airline/vim-airline.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-airline" +& git clone --depth=1 https://github.com/vim-airline/vim-airline.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-airline" \ No newline at end of file diff --git a/vim-ale/install.ps1 b/vim-ale/install.ps1 index 46b4758..ae2e666 100644 --- a/vim-ale/install.ps1 +++ b/vim-ale/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\ale" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/dense-analysis/ale.git "$Env:USERPROFILE\.vim\pack\plugins\start\ale" +& git clone --depth=1 https://github.com/dense-analysis/ale.git "$Env:USERPROFILE\.vim\pack\plugins\start\ale" \ No newline at end of file diff --git a/vim-commentary/install.ps1 b/vim-commentary/install.ps1 index 19d801e..a477826 100644 --- a/vim-commentary/install.ps1 +++ b/vim-commentary/install.ps1 @@ -5,7 +5,7 @@ $my_pkg_name = "vim-commentary" $my_repo = "https://github.com/tpope/vim-commentary" IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\${my_name}" -Recurse -ErrorAction Ignore @@ -14,4 +14,4 @@ Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\${my_name}" -Recurse IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\plugin\$my_name.vim")) { IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } curl.exe -sS -o "$Env:USERPROFILE\.vim\plugin\$my_name.vim" "$Env:WEBI_HOST/packages/${my_pkg_name}/${my_name}.vim" -} +} \ No newline at end of file diff --git a/vim-devicons/install.ps1 b/vim-devicons/install.ps1 index e96c2db..b7fb5cc 100644 --- a/vim-devicons/install.ps1 +++ b/vim-devicons/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\devicons" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/ryanoasis/vim-devicons.git "$Env:USERPROFILE\.vim\pack\plugins\start\devicons.vim" +& git clone --depth=1 https://github.com/ryanoasis/vim-devicons.git "$Env:USERPROFILE\.vim\pack\plugins\start\devicons.vim" \ No newline at end of file diff --git a/vim-go/install.ps1 b/vim-go/install.ps1 index 617ae33..4457b92 100644 --- a/vim-go/install.ps1 +++ b/vim-go/install.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null +New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\vim-go" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/fatih/vim-go.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-go" +& git clone --depth=1 https://github.com/fatih/vim-go.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-go" \ No newline at end of file diff --git a/vim-lastplace/install.ps1 b/vim-lastplace/install.ps1 index 5a41edb..39d6d40 100644 --- a/vim-lastplace/install.ps1 +++ b/vim-lastplace/install.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null +New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\vim-lastplace" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/farmergreg/vim-lastplace.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-lastplace" +& git clone --depth=1 https://github.com/farmergreg/vim-lastplace.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-lastplace" \ No newline at end of file diff --git a/vim-nerdtree/install.ps1 b/vim-nerdtree/install.ps1 index 7d099a8..facda7d 100644 --- a/vim-nerdtree/install.ps1 +++ b/vim-nerdtree/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\nerdtree" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/preservim/nerdtree.git "$Env:USERPROFILE\.vim\pack\plugins\start\nerdtree.vim" +& git clone --depth=1 https://github.com/preservim/nerdtree.git "$Env:USERPROFILE\.vim\pack\plugins\start\nerdtree.vim" \ No newline at end of file diff --git a/vim-prettier/install.ps1 b/vim-prettier/install.ps1 index a45750e..e838c9a 100644 --- a/vim-prettier/install.ps1 +++ b/vim-prettier/install.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null +New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\vim-prettier" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/prettier/vim-prettier.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-prettier" +& git clone --depth=1 https://github.com/prettier/vim-prettier.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-prettier" \ No newline at end of file diff --git a/vim-rust/install.ps1 b/vim-rust/install.ps1 index 0ef2145..736eb83 100644 --- a/vim-rust/install.ps1 +++ b/vim-rust/install.ps1 @@ -1,6 +1,6 @@ #!/usr/bin/env pwsh -New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null +New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\rust.vim" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/rust-lang/rust.vim "$Env:USERPROFILE\.vim\pack\plugins\start\rust.vim" +& git clone --depth=1 https://github.com/rust-lang/rust.vim "$Env:USERPROFILE\.vim\pack\plugins\start\rust.vim" \ No newline at end of file diff --git a/vim-sensible/install.ps1 b/vim-sensible/install.ps1 index 1d57646..129438e 100644 --- a/vim-sensible/install.ps1 +++ b/vim-sensible/install.ps1 @@ -5,7 +5,7 @@ $my_pkg_name = "vim-sensible" $my_repo = "https://github.com/tpope/vim-sensible" IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\${my_name}" -Recurse -ErrorAction Ignore @@ -14,4 +14,4 @@ Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\${my_name}" -Recurse IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\plugin\$my_name.vim")) { IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } curl.exe -sS -o "$Env:USERPROFILE\.vim\plugin\$my_name.vim" "$Env:WEBI_HOST/packages/${my_pkg_name}/${my_name}.vim" -} +} \ No newline at end of file diff --git a/vim-shfmt/install.ps1 b/vim-shfmt/install.ps1 index 2c811d0..0db0978 100644 --- a/vim-shfmt/install.ps1 +++ b/vim-shfmt/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\shfmt" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/z0mbix/vim-shfmt.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-shfmt" +& git clone --depth=1 https://github.com/z0mbix/vim-shfmt.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-shfmt" \ No newline at end of file diff --git a/vim-smartcase/install.ps1 b/vim-smartcase/install.ps1 index 2e4bdd1..7e3b82f 100644 --- a/vim-smartcase/install.ps1 +++ b/vim-smartcase/install.ps1 @@ -6,4 +6,4 @@ $my_pkg_name = "vim-smartcase" IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\plugin\$my_name.vim")) { IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } curl.exe -sS -o "$Env:USERPROFILE\.vim\plugin\$my_name.vim" "$Env:WEBI_HOST/packages/${my_pkg_name}/${my_name}.vim" -} +} \ No newline at end of file diff --git a/vim-syntastic/install.ps1 b/vim-syntastic/install.ps1 index 9520685..e425918 100644 --- a/vim-syntastic/install.ps1 +++ b/vim-syntastic/install.ps1 @@ -1,7 +1,7 @@ #!/usr/bin/env pwsh IF (!(Test-Path -Path "$Env:USERPROFILE\.vim\pack\plugins\start")) { - New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | out-null + New-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start" -ItemType Directory -Force | Out-Null } Remove-Item -Path "$Env:USERPROFILE\.vim\pack\plugins\start\vim-syntastic" -Recurse -ErrorAction Ignore -& git clone --depth=1 https://github.com/vim-syntastic/syntastic.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-syntastic" +& git clone --depth=1 https://github.com/vim-syntastic/syntastic.git "$Env:USERPROFILE\.vim\pack\plugins\start\vim-syntastic" \ No newline at end of file diff --git a/watchexec/install.ps1 b/watchexec/install.ps1 index 1f1f47c..21be395 100644 --- a/watchexec/install.ps1 +++ b/watchexec/install.ps1 @@ -15,41 +15,39 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\watchexec-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\watchexec-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading watchexec from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing watchexec" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\watchexec-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\watchexec.exe" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\watchexec-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\watchexec.exe" -Recurse -ErrorAction Ignore - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\watchexec-*\watchexec.exe" -Destination "$pkg_src_bin" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\watchexec-*\watchexec.exe" -Destination "$pkg_src_bin" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/webi/install.ps1 b/webi/install.ps1 index 91a2774..a5b9646 100644 --- a/webi/install.ps1 +++ b/webi/install.ps1 @@ -1,3 +1,3 @@ #!/usr/bin/env pwsh -# do nothing because this is a special case +# do nothing because this is a special case \ No newline at end of file diff --git a/wsl/install-wsl.ps1 b/wsl/install-wsl.ps1 index 95b1cde..c5bc944 100644 --- a/wsl/install-wsl.ps1 +++ b/wsl/install-wsl.ps1 @@ -7,23 +7,20 @@ echo "" echo "Installing 2 of 5 VirtualMachinePlatform (for WSL 2 Hyper-V) ..." & dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart -Function Test-CommandExists -{ +Function Test-CommandExists { Param ($command) $oldPreference = $ErrorActionPreference $ErrorActionPreference = 'stop' - try {if(Get-Command $command){RETURN $true}} - Catch {RETURN $false} - Finally {$ErrorActionPreference=$oldPreference} + try { if (Get-Command $command) { RETURN $true } } + Catch { RETURN $false } + Finally { $ErrorActionPreference = $oldPreference } } echo "" -IF(!(Test-CommandExists wsl)) -{ +IF (!(Test-CommandExists wsl)) { echo "Skipping 3 of 5: Microsoft Linux Kernel requires WSL 1 to be installed first ..." } -ELSE -{ +ELSE { echo "Installing 3 of 5 Microsoft Linux Kernel (wsl_update_x64.msi for WSL 2) ..." IF (!(Test-Path -Path "$Env:TEMP\wsl_update_x64.msi")) { & curl.exe -f -o "$Env:TEMP\wsl_update_x64.msi" "https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi" @@ -41,4 +38,4 @@ ELSE powershell -Command "Start-Process msiexec -Wait -ArgumentList '/i','$Env:TEMP\wsl_update_x64.msi','/quiet','/qn'" } -Start-Sleep -s 3 +Start-Sleep -s 3 \ No newline at end of file diff --git a/wsl/install.ps1 b/wsl/install.ps1 index 5972528..90d9711 100644 --- a/wsl/install.ps1 +++ b/wsl/install.ps1 @@ -7,14 +7,13 @@ echo "Security: requires administrator approval to install" IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } # From https://devblogs.microsoft.com/scripting/use-a-powershell-function-to-see-if-a-command-exists/ -Function Test-CommandExists -{ +Function Test-CommandExists { Param ($command) $oldPreference = $ErrorActionPreference $ErrorActionPreference = 'stop' - try {if(Get-Command $command){RETURN $true}} - Catch {RETURN $false} - Finally {$ErrorActionPreference=$oldPreference} + try { if (Get-Command $command) { RETURN $true } } + Catch { RETURN $false } + Finally { $ErrorActionPreference = $oldPreference } } @@ -22,15 +21,15 @@ Function Test-CommandExists & curl.exe -fsSA "MS" -o "$Env:TEMP\install-wsl2.ps1" "$Env:WEBI_HOST/packages/wsl/install-wsl.ps1" powershell -Command "Start-Process cmd -Wait -Verb RunAs -ArgumentList '/c cd /d %CD% && powershell -ExecutionPolicy Bypass $Env:TEMP\install-wsl2.ps1'" -IF(!(Test-CommandExists wsl)) -{ +IF (!(Test-CommandExists wsl)) { echo "Warning: Skipping 3 of 5: Reboot Required to install WSL 2 !!" } echo "" IF ((Test-Path -Path "$Env:UserProfile\Downloads\webi\Ubuntu_2004_x64.appx" )) { echo "Skipping 4 of 5: Ubuntu Linux 20.04 already installed" -} ELSE { +} +ELSE { echo "Installing 4 of 5 Ubuntu Linux 20.04 (for WSL 1 and WSL 2) ..." curl.exe -fL -o "$Env:UserProfile\Downloads\webi\Ubuntu_2004_x64.appx.part" https://aka.ms/wslubuntu2004 & move "$Env:UserProfile\Downloads\webi\Ubuntu_2004_x64.appx.part" "$Env:UserProfile\Downloads\webi\Ubuntu_2004_x64.appx" @@ -47,8 +46,7 @@ echo "!!! READ CAREFULLY! !!!" echo "!!! !!!" echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" -IF(!(Test-CommandExists wsl)) -{ +IF (!(Test-CommandExists wsl)) { echo "" echo "WSL 2 was NOT installed yet. FOLLOW these instructions:" echo "" @@ -70,4 +68,4 @@ echo "" echo " - Select Ubuntu Linux from the Search menu or Start Menu" echo " - Wait for the initialization to complete" echo " - Choose a username (we recommend 'app') and a password" -echo "" +echo "" \ No newline at end of file diff --git a/wsl1/install.ps1 b/wsl1/install.ps1 index ede5da3..20e9f5f 100644 --- a/wsl1/install.ps1 +++ b/wsl1/install.ps1 @@ -10,4 +10,4 @@ powershell -Command "Start-Process cmd -Verb RunAs -ArgumentList '/c cd /d %CD% echo "!!!!!!!!!!!!!!!!!!!!!!!!!" echo "!!! Reboot REQUIRED !!!" echo "!!!!!!!!!!!!!!!!!!!!!!!!!" -echo "" +echo "" \ No newline at end of file diff --git a/wsl2/install-wsl2.ps1 b/wsl2/install-wsl2.ps1 index 3f419b9..3753597 100644 --- a/wsl2/install-wsl2.ps1 +++ b/wsl2/install-wsl2.ps1 @@ -7,23 +7,20 @@ echo "" echo "Installing 2 of 3 VirtualMachinePlatform ..." & dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart -Function Test-CommandExists -{ +Function Test-CommandExists { Param ($command) $oldPreference = $ErrorActionPreference $ErrorActionPreference = 'stop' - try {if(Get-Command $command){RETURN $true}} - Catch {Write-Host “$command does not exist”; RETURN $false} - Finally {$ErrorActionPreference=$oldPreference} + try { if (Get-Command $command) { RETURN $true } } + Catch { Write-Host “$command does not exist”; RETURN $false } + Finally { $ErrorActionPreference = $oldPreference } } echo "" -IF(!(Test-CommandExists wsl)) -{ +IF (!(Test-CommandExists wsl)) { echo "Skipping 3 of 3: Microsoft Linux Kernel requires WSL 1 to be installed first ..." } -ELSE -{ +ELSE { echo "Installing 3 of 3 Microsoft Linux Kernel (wsl_update_x64.msi) ..." IF (!(Test-Path -Path "$Env:TEMP\wsl_update_x64.msi")) { @@ -42,4 +39,4 @@ ELSE powershell -Command "Start-Process msiexec -Wait -ArgumentList '/i','$Env:TEMP\wsl_update_x64.msi','/quiet','/qn'" } -Start-Sleep -s 3 +Start-Sleep -s 3 \ No newline at end of file diff --git a/wsl2/install.ps1 b/wsl2/install.ps1 index c1cd83a..d310b9b 100644 --- a/wsl2/install.ps1 +++ b/wsl2/install.ps1 @@ -11,18 +11,16 @@ $MYPWD = (Get-Item .).FullName powershell -Command "Start-Process cmd -Wait -Verb RunAs -ArgumentList '/c cd /d %CD% && powershell -ExecutionPolicy Bypass $Env:TEMP\install-wsl2.ps1'" # From https://devblogs.microsoft.com/scripting/use-a-powershell-function-to-see-if-a-command-exists/ -Function Test-CommandExists -{ +Function Test-CommandExists { Param ($command) $oldPreference = $ErrorActionPreference $ErrorActionPreference = 'stop' - try {if(Get-Command $command){RETURN $true}} - Catch {RETURN $false} - Finally {$ErrorActionPreference=$oldPreference} + try { if (Get-Command $command) { RETURN $true } } + Catch { RETURN $false } + Finally { $ErrorActionPreference = $oldPreference } } -IF(!(Test-CommandExists wsl)) -{ +IF (!(Test-CommandExists wsl)) { echo "" echo "" echo "" @@ -66,4 +64,4 @@ echo "" echo " 2. Set WSL to use WSL 2 with Hyper-V. For example:" echo " wsl.exe --set-version Ubuntu-20.04 2" echo " wsl.exe --set-default-version 2" -echo "" +echo "" \ No newline at end of file diff --git a/xsv/install.ps1 b/xsv/install.ps1 index 94141d9..66be952 100644 --- a/xsv/install.ps1 +++ b/xsv/install.ps1 @@ -16,12 +16,11 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\xsv-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\xsv-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Checking for (or Installing) MSVC Runtime..." & "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" vcruntime @@ -30,8 +29,7 @@ IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing xsv" # TODO: create package-specific temp directory @@ -49,7 +47,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) # Settle unpacked archive into place echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null Move-Item -Path ".\xsv.exe" -Destination "$pkg_src_bin" # Exit tmp @@ -57,6 +55,6 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +New-Item "$pkg_dst_bin" -ItemType Directory -Force | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/xz/install.ps1 b/xz/install.ps1 index 099542a..9920060 100644 --- a/xz/install.ps1 +++ b/xz/install.ps1 @@ -15,41 +15,39 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\xz-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\xz-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading xz from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing xz" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\bin_x86-64\xz.exe" -Destination "$pkg_src_bin" - Move-Item -Path ".\bin_x86-64\xzdec.exe" -Destination "$pkg_src_bin" - Copy-Item -Path "$pkg_src_bin\xzdec.exe" -Destination "$pkg_src_bin\unxz.exe" - Move-Item -Path ".\bin_x86-64\lzmadec.exe" -Destination "$pkg_src_bin" - Copy-Item -Path "$pkg_src_bin\lzmadec.exe" -Destination "$pkg_src_bin\unlzma.exe" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\bin_x86-64\xz.exe" -Destination "$pkg_src_bin" + Move-Item -Path ".\bin_x86-64\xzdec.exe" -Destination "$pkg_src_bin" + Copy-Item -Path "$pkg_src_bin\xzdec.exe" -Destination "$pkg_src_bin\unxz.exe" + Move-Item -Path ".\bin_x86-64\lzmadec.exe" -Destination "$pkg_src_bin" + Copy-Item -Path "$pkg_src_bin\lzmadec.exe" -Destination "$pkg_src_bin\unlzma.exe" # Exit tmp popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/yq/install.ps1 b/yq/install.ps1 index 7597f9b..25a8fc2 100644 --- a/yq/install.ps1 +++ b/yq/install.ps1 @@ -10,34 +10,32 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\yq-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\yq-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading yq from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing yq" pushd .local\tmp - Remove-Item -Path ".\yq-v*" -Recurse -ErrorAction Ignore - Remove-Item -Path ".\yq.exe" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\yq-v*" -Recurse -ErrorAction Ignore + Remove-Item -Path ".\yq.exe" -Recurse -ErrorAction Ignore - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - echo "Install Location: $pkg_src_cmd" - New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null - Move-Item -Path ".\yq*.exe" -Destination "$pkg_src_cmd" + echo "Install Location: $pkg_src_cmd" + New-Item "$pkg_src_bin" -ItemType Directory -Force | Out-Null + Move-Item -Path ".\yq*.exe" -Destination "$pkg_src_cmd" popd } echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" -Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | Out-Null +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file diff --git a/zig/install.ps1 b/zig/install.ps1 index 1b41673..f8eecfd 100644 --- a/zig/install.ps1 +++ b/zig/install.ps1 @@ -17,44 +17,42 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\zig-v$Env:WEBI_VERSION" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\zig-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_dir" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive -IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) -{ +IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) { echo "Downloading ziglang from $Env:WEBI_PKG_URL to $pkg_download" & curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part" & move "$pkg_download.part" "$pkg_download" } -IF (!(Test-Path -Path "$pkg_src_cmd")) -{ +IF (!(Test-Path -Path "$pkg_src_cmd")) { echo "Installing ziglang" # TODO: create package-specific temp directory # Enter tmp pushd .local\tmp - # Remove any leftover tmp cruft - Remove-Item -Path ".\zig-*" -Recurse -ErrorAction Ignore + # Remove any leftover tmp cruft + Remove-Item -Path ".\zig-*" -Recurse -ErrorAction Ignore - # Unpack archive file into this temporary directory - # Windows BSD-tar handles zip. Imagine that. - echo "Unpacking $pkg_download" - & tar xf "$pkg_download" + # Unpack archive file into this temporary directory + # Windows BSD-tar handles zip. Imagine that. + echo "Unpacking $pkg_download" + & tar xf "$pkg_download" - # Settle unpacked archive into place - echo "Install Location: $pkg_src_cmd" - Move-Item -Path ".\zig-*" -Destination "$pkg_src" + # Settle unpacked archive into place + echo "Install Location: $pkg_src_cmd" + Move-Item -Path ".\zig-*" -Destination "$pkg_src" # Exit tmp popd } echo "Copying into '$pkg_dst' from '$pkg_src'" -Remove-Item -Path "$pkg_dst" -Recurse -ErrorAction Ignore | out-null +Remove-Item -Path "$pkg_dst" -Recurse -ErrorAction Ignore | Out-Null Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse # Add to Windows PATH -webi_path_add ~/.local/opt/zig +webi_path_add ~/.local/opt/zig \ No newline at end of file diff --git a/ziglang/install.ps1 b/ziglang/install.ps1 index 031e30f..525822b 100644 --- a/ziglang/install.ps1 +++ b/ziglang/install.ps1 @@ -2,4 +2,4 @@ echo "'ziglang@$Env:WEBI_TAG' is an alias for 'zig@$Env:WEBI_VERSION'" IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" } -curl.exe -fsSL "$Env:WEBI_HOST/zig@$Env:WEBI_VERSION" | powershell +curl.exe -fsSL "$Env:WEBI_HOST/zig@$Env:WEBI_VERSION" | powershell \ No newline at end of file diff --git a/zoxide/install.ps1 b/zoxide/install.ps1 index 30d1821..7c714eb 100644 --- a/zoxide/install.ps1 +++ b/zoxide/install.ps1 @@ -15,7 +15,7 @@ $pkg_src_bin = "$Env:USERPROFILE\.local\opt\zoxide-v$Env:WEBI_VERSION\bin" $pkg_src_dir = "$Env:USERPROFILE\.local\opt\zoxide-v$Env:WEBI_VERSION" $pkg_src = "$pkg_src_cmd" -New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null +New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | Out-Null $pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE" # Fetch archive @@ -49,4 +49,4 @@ IF (!(Test-Path -Path "$pkg_src_cmd")) { Write-Output "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'" Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore -Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse +Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse \ No newline at end of file