projects
/
webi-installers
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
feature(windows): make it more clear that the user needs to update their PATH
[webi-installers/.git]
/
_example
/
install.ps1
diff --git
a/_example/install.ps1
b/_example/install.ps1
index e99cf7f9fc4a69f917ca2313089fac0aeb964c32..2fb5b5cf710dd19cfe32395d103ef5abff9904b1 100644
(file)
--- a/
_example/install.ps1
+++ b/
_example/install.ps1
@@
-15,10
+15,11
@@
$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"
$pkg_src_dir = "$Env:USERPROFILE\.local\opt\foobar-v$Env:WEBI_VERSION"
$pkg_src = "$pkg_src_cmd"
-$pkg_download = "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE"
+New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null
+$pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
# Fetch archive
# Fetch archive
-IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE"))
+IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\
webi\
$Env:WEBI_PKG_FILE"))
{
# TODO: arch detection
echo "Downloading foobar from $Env:WEBI_PKG_URL to $pkg_download"
{
# TODO: arch detection
echo "Downloading foobar from $Env:WEBI_PKG_URL to $pkg_download"
@@
-34,7
+35,7
@@
IF (!(Test-Path -Path "$pkg_src_cmd"))
# Enter tmp
pushd .local\tmp
# 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
Remove-Item -Path ".\foobar-v*" -Recurse -ErrorAction Ignore
Remove-Item -Path ".\foo.exe" -Recurse -ErrorAction Ignore
@@
-46,10
+47,10
@@
IF (!(Test-Path -Path "$pkg_src_cmd"))
# Windows BSD-tar handles zip. Imagine that.
echo "Unpacking $pkg_download"
& tar xf "$pkg_download"
# 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"
# 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
Move-Item -Path ".\foobar-*\foo.exe" -Destination "$pkg_src_bin"
# Exit tmp
@@
-57,5
+58,5
@@
IF (!(Test-Path -Path "$pkg_src_cmd"))
}
echo "Copying into '$pkg_dst_cmd' from '$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
Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse