summaryrefslogtreecommitdiffstats
path: root/install.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'install.ps1')
-rw-r--r--install.ps126
1 files changed, 7 insertions, 19 deletions
diff --git a/install.ps1 b/install.ps1
index f29ed6b2..855a6f34 100644
--- a/install.ps1
+++ b/install.ps1
@@ -1,10 +1,4 @@
-$version="0.23.1"
-
-if ([Environment]::Is64BitProcess) {
- $binary_arch="amd64"
-} else {
- $binary_arch="386"
-}
+$version="0.24.0-rc1"
$fzf_base=Split-Path -Parent $MyInvocation.MyCommand.Definition
@@ -32,12 +26,10 @@ function check_binary () {
function download {
param($file)
Write-Host "Downloading bin/fzf ..."
- if ("$version" -ne "alpha") {
- if (Test-Path "$fzf_base\bin\fzf.exe") {
- Write-Host " - Already exists"
- if (check_binary) {
- return
- }
+ if (Test-Path "$fzf_base\bin\fzf.exe") {
+ Write-Host " - Already exists"
+ if (check_binary) {
+ return
}
}
if (-not (Test-Path "$fzf_base\bin")) {
@@ -48,11 +40,7 @@ function download {
return
}
cd "$fzf_base\bin"
- if ("$version" -eq "alpha") {
- $url="https://github.com/junegunn/fzf-bin/releases/download/alpha/$file"
- } else {
- $url="https://github.com/junegunn/fzf-bin/releases/download/$version/$file"
- }
+ $url="https://github.com/junegunn/fzf/releases/download/$version/$file"
$temp=$env:TMP + "\fzf.zip"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
(New-Object Net.WebClient).DownloadFile($url, $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath("$temp"))
@@ -68,6 +56,6 @@ function download {
check_binary >$null
}
-download "fzf-$version-windows_$binary_arch.zip"
+download "fzf-$version-windows_amd64.zip"
Write-Host 'For more information, see: https://github.com/junegunn/fzf'