Skip to content

Commit

Permalink
(winscp.portable) Fixing WinSCP portable zip
Browse files Browse the repository at this point in the history
URL has changed and parsing updated
  • Loading branch information
gaelcolas authored and JPRuskin committed Apr 23, 2024
1 parent 229cc8f commit 68eda6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions automatic/winscp.portable/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.+Portable\.zip$'
$re = 'WinSCP.+Portable\.zip/download$'

function global:au_SearchReplace {
@{
Expand Down Expand Up @@ -33,7 +33,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 68eda6d

Please sign in to comment.