Skip to content

Commit

Permalink
(tor-browser) update++ - fixed missing url domain
Browse files Browse the repository at this point in the history
  • Loading branch information
majkinetor committed Oct 4, 2019
1 parent cfd96cb commit c388535
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions automatic/tor-browser/update.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import-module au
Import-Module $env:chocolateyInstall\helpers\chocolateyInstaller.psm1

$domain = 'https://www.torproject.org'
$releases = "$domain/download/languages/"
$releases = "https://www.torproject.org/download/languages/"
$domain = $releases -split '(?<=//.+)/' | select -First 1

function GetChecksum() {
param($url)
Expand Down Expand Up @@ -38,7 +38,7 @@ function global:au_GetLatest {
$allExes = $download_page.Links | ? href -match "\.exe$" | select -expand href
$usUrl = $allExes | ? { $_ -match "torbrowser-install.*en-US\.exe$" } | select -First 1
$version = $usUrl -split '\/' | select -last 1 -skip 1
[array]$all64Urls = $allExes | ? { $_ -match $version -and $_ -match "Win64" }
[array]$all64Urls = $allExes | ? { $_ -match $version -and $_ -match "Win64" } | % { $domain + $_}
if ($all64Urls.Count -eq 0) {
throw "Missing urls was found for either 32 bit or 64 bit"
}
Expand Down

0 comments on commit c388535

Please sign in to comment.