From 716a0bea5173f042008816b6adf3d59c3c9cbe70 Mon Sep 17 00:00:00 2001 From: Tunisiano187 Date: Fri, 20 Sep 2024 16:43:26 +0200 Subject: [PATCH] clean and no downloads => d* --- automatic/cryptsync/update.ps1 | 5 ++++- automatic/csvfileview/update.ps1 | 6 ------ automatic/dexpot/update.ps1 | 10 +++++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/automatic/cryptsync/update.ps1 b/automatic/cryptsync/update.ps1 index cfe04324e..e78b55be7 100644 --- a/automatic/cryptsync/update.ps1 +++ b/automatic/cryptsync/update.ps1 @@ -19,6 +19,10 @@ function global:au_SearchReplace { } } +function global:au_BeforeUpdate { + Invoke-WebRequest -Uri "https://raw.githubusercontent.com/stefankueng/CryptSync/master/LICENSE" -OutFile ".\tools\LICENSE.txt" +} + function global:au_AfterUpdate($Package) { Invoke-VirusTotalScan $Package } @@ -36,7 +40,6 @@ function global:au_GetLatest { $version = "$version-pre$($date)" } } - Invoke-WebRequest -Uri "https://raw.githubusercontent.com/stefankueng/CryptSync/master/LICENSE" -OutFile ".\tools\LICENSE.txt" $Latest = @{ URL32 = $url32; URL64 = $url64; Version = $version } return $Latest diff --git a/automatic/csvfileview/update.ps1 b/automatic/csvfileview/update.ps1 index 0e41e5093..3d73821c5 100644 --- a/automatic/csvfileview/update.ps1 +++ b/automatic/csvfileview/update.ps1 @@ -6,12 +6,6 @@ $url32 = 'https://www.nirsoft.net/utils/csvfileview.zip' Add-Type -AssemblyName System.IO.Compression.FileSystem -function Unzip -{ - param([string]$zipfile, [string]$outpath) - [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath) -} - function global:au_SearchReplace { @{ 'tools/chocolateyInstall.ps1' = @{ diff --git a/automatic/dexpot/update.ps1 b/automatic/dexpot/update.ps1 index a4e70a196..ca173d923 100644 --- a/automatic/dexpot/update.ps1 +++ b/automatic/dexpot/update.ps1 @@ -18,11 +18,11 @@ function global:au_AfterUpdate($Package) { } function global:au_GetLatest { - $File = Join-Path $env:TEMP "dexpot.exe" - $url32 = "https://dexpot.de/$($((Invoke-WebRequest -Uri $release -UseBasicParsing).Links | Where-Object {$_ -match 'exe'}).outerHTML.split('"')[1])" - Invoke-WebRequest -Uri $url32 -OutFile $File - $version=[System.Diagnostics.FileVersionInfo]::GetVersionInfo($File).FileVersion - if($version -eq "1.6.14") { $version="1.6.14.1" } #Solve previously rejected + $page = Invoke-WebRequest -Uri "https://dexpot.de/?id=download" -UseBasicParsing + $regexPattern = '
  • (\d+\.\d+\.\d+)\s+Build\s+(\d+)' + $versionMatch = $page.Content | Select-String -Pattern $regexPattern -AllMatches + $match = $versionMatch.Matches[0] + $version = "$($match.Groups[1].Value).$($match.Groups[2].Value)" $Latest = @{ URL32 = $url32; Version = $version } return $Latest