-
Notifications
You must be signed in to change notification settings - Fork 372
/
chocolateyInstall.ps1
29 lines (24 loc) · 1.14 KB
/
chocolateyInstall.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
. $toolsPath\helpers.ps1
$packageArgs = @{
packageName = $env:ChocolateyPackageName
url = 'https://github.com/brave/brave-browser/releases/download/v1.62.130/BraveBrowserStandaloneSilentBetaSetup32.exe'
checksum = '16810DB352137A07DEB50ECA9160D4F8865A8C7E5133C1C58ECF806961748E33'
checksumType= 'sha256'
file64 = "$toolsPath\BraveBrowserStandaloneSilentBetaSetup.exe"
}
[version]$softwareVersion = '1.62.130'
Write-Host "Checking already installed version..."
$installedVersion = Get-InstalledVersion
if ($installedVersion -and ($softwareVersion -lt $installedVersion)) {
Write-Warning "Skipping installation because a later version than $softwareVersion is installed."
}
elseif ($installedVersion -and ($softwareVersion -eq $installedVersion)) {
Write-Warning "Skipping installation because version $softwareVersion is already installed."
}
elseif ((Get-OSArchitectureWidth -compare 32) -or ($env:ChocolateyForceX86 -eq $true)) {
Install-ChocolateyPackage @packageArgs
} else {
Install-ChocolateyInstallPackage @packageArgs
}
Remove-Item $toolsPath\*.exe -ea 0