feature: add gh + cheat sheet
[webi-installers/.git] / _example / install.ps1
index 9a2744e8c668f54cf783d57379011df5a24fc600..c3547e350716d2fa772aca515298eb3ec827fc63 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 ".\foobar-v*" -Recurse -ErrorAction Ignore
         Remove-Item -Path ".\foo.exe" -Recurse -ErrorAction Ignore
 
@@ -46,11 +46,10 @@ IF (!(Test-Path -Path "$pkg_src_cmd"))
         # 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
+        New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null
         Move-Item -Path ".\foobar-*\foo.exe" -Destination "$pkg_src_bin"
 
     # Exit tmp
@@ -58,5 +57,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