cleanup: shfmt, shellcheck, and whitespace
[webi-installers/.git] / rg / install.ps1
index 2c161a022dc58a1194563eb511b0e5b2e264ab7e..f6da869fdb49843211cdb171f5fdcc48daddcda8 100644 (file)
@@ -34,7 +34,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd"))
     # Enter tmp
     pushd .local\tmp
 
-        # Remove any leftover tmp cruft 
+        # Remove any leftover tmp cruft
         Remove-Item -Path ".\ripgrep-v*" -Recurse -ErrorAction Ignore
         Remove-Item -Path ".\rg.exe" -Recurse -ErrorAction Ignore
 
@@ -42,11 +42,11 @@ IF (!(Test-Path -Path "$pkg_src_cmd"))
         # Windows BSD-tar handles zip. Imagine that.
         echo "Unpacking $pkg_download"
         & tar xf "$pkg_download"
-        & dir
+
 
         # Settle unpacked archive into place
         echo "Install Location: $pkg_src_cmd"
-        New-Item "$pkg_src_bin" -ItemType Directory
+        New-Item "$pkg_src_bin" -ItemType Directory -Force
         Move-Item -Path ".\ripgrep-*\rg.exe" -Destination "$pkg_src_bin"
 
     # Exit tmp
@@ -54,5 +54,5 @@ 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
+Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null
 Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse