From 5787967c1fd94f886a3d92d7716c7298637f014f Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 6 Sep 2020 14:30:37 +0530 Subject: [PATCH] Move $arch_name to tools/blackfire.ps1 --- src/scripts/tools/blackfire.ps1 | 4 ++++ src/scripts/win32.ps1 | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scripts/tools/blackfire.ps1 b/src/scripts/tools/blackfire.ps1 index 5dca721d..ac83fdb0 100644 --- a/src/scripts/tools/blackfire.ps1 +++ b/src/scripts/tools/blackfire.ps1 @@ -1,5 +1,9 @@ # Function to add blackfire and blackfire-agent. Function Add-Blackfire() { + $arch_name ='amd64' + if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') { + $arch_name = '386' + } $agent_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).agent $url = "https://packages.blackfire.io/binaries/blackfire-agent/${agent_version}/blackfire-agent-windows_${arch_name}.zip" Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $bin_dir\blackfire.zip >$null 2>&1 diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index cb5649ab..28df8092 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -289,10 +289,8 @@ $master_version = '8.0' $cert_source='CurrentUser' $arch = 'x64' -$arch_name ='amd64' if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') { $arch = 'x86' - $arch_name = '386' } $ts = $env:PHPTS -eq 'ts'