Skip to content

Commit

Permalink
(winscp.install) Fixing URL parsing for download
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelcolas authored and JPRuskin committed Apr 23, 2024
1 parent dc13851 commit 229cc8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions automatic/winscp.install/update.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Import-Module Chocolatey-AU

$releases = 'https://winscp.net/eng/downloads.php'
$re = 'WinSCP.+\.exe$'
$re = 'WinSCP.+\.exe/download$'

function global:au_SearchReplace {
@{
Expand All @@ -24,7 +24,7 @@ function global:au_GetLatest {
$url = @($download_page.links | Where-Object href -match $re) -notmatch 'beta|rc' | ForEach-Object href
$url = 'https://winscp.net/eng' + $url
$version = $url -split '-' | Select-Object -Last 1 -Skip 1
$file_name = $url -split '/' | Select-Object -last 1
$file_name = $url -split '/' | Select-Object -last 1 -Skip 1
@{
Version = $version
URL32 = "https://sourceforge.net/projects/winscp/files/WinSCP/$version/$file_name/download"
Expand Down

0 comments on commit 229cc8f

Please sign in to comment.