From 54e3af85426c1a122874256848da5c526c42a189 Mon Sep 17 00:00:00 2001 From: Tunisiano Date: Sun, 22 Sep 2024 10:12:34 +0000 Subject: [PATCH 1/3] ps1 vars [skip ci] --- automatic/gnu-units/update.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automatic/gnu-units/update.ps1 b/automatic/gnu-units/update.ps1 index 9b65246c7..7e7b9e309 100644 --- a/automatic/gnu-units/update.ps1 +++ b/automatic/gnu-units/update.ps1 @@ -45,7 +45,7 @@ function global:au_GetLatest { foreach ($link in $fileLinks) { if ($link.href -match $versionPattern) { $version = [Version]$matches[1] - + # Compare the current version with the highest version found so far if ($version -gt $highestVersion) { $highestVersion = $version @@ -64,4 +64,4 @@ function global:au_GetLatest { return $Latest } -update -NoCheckChocoVersion \ No newline at end of file +update -NoCheckChocoVersion From 7cbe6274b70fc5c627a283d850f452a2f664ee7a Mon Sep 17 00:00:00 2001 From: Tunisiano187 Date: Sun, 22 Sep 2024 12:12:41 +0200 Subject: [PATCH 2/3] gnu-units --- automatic/gnu-units/README.md | 17 ----- automatic/gnu-units/gnu-units.nuspec | 1 + .../gnu-units/{tools => legal}/LICENSE.txt | 0 automatic/gnu-units/legal/VERIFICATION.txt | 17 +++++ .../gnu-units/tools/ChocolateyInstall.ps1 | 3 +- automatic/gnu-units/tools/VERIFICATION.txt | 9 --- .../gnu-units/tools/units-2.22-setup.exe.sig | Bin 287 -> 0 bytes automatic/gnu-units/update.ps1 | 67 ++++++++++++++++++ 8 files changed, 87 insertions(+), 27 deletions(-) rename automatic/gnu-units/{tools => legal}/LICENSE.txt (100%) create mode 100644 automatic/gnu-units/legal/VERIFICATION.txt delete mode 100644 automatic/gnu-units/tools/VERIFICATION.txt delete mode 100644 automatic/gnu-units/tools/units-2.22-setup.exe.sig create mode 100644 automatic/gnu-units/update.ps1 diff --git a/automatic/gnu-units/README.md b/automatic/gnu-units/README.md index acf38ddab..811169a69 100644 --- a/automatic/gnu-units/README.md +++ b/automatic/gnu-units/README.md @@ -2,29 +2,12 @@ ## GNU Units (Install) ---- - -### [choco://gnu-units](choco://gnu-units) -To use choco:// protocol URLs, install [(unofficial) choco:// Protocol support ](https://chocolatey.org/packages/choco-protocol-support) - ---- - GNU Units converts quantities expressed in various systems of measurement to their equivalents in other systems of measurement. Like many similar programs, it can handle multiplicative scale changes. It can also handle nonlinear conversions such as Fahrenheit to Celsius or wire gauge, and it can convert from and to sums of units, such as converting between meters and feet plus inches. Beyond simple unit conversions, GNU Units can be used as a general-purpose scientific calculator that keeps track of units in its calculations. You can form arbitrary complex mathematical expressions of dimensions including sums, products, quotients, powers, and even roots of dimensions. Thus you can ensure accuracy and dimensional consistency when working with long expressions that involve many different units that may combine in complex ways. The units are defined in an external data file. You can use the extensive data file that comes with this program, or you can provide your own data file to suit your needs. You can also use your own data file to supplement the standard data file. -**[PACKAGE NOTES](https://github.com/bcurran3/ChocolateyPackages/blob/master/gnu-units/readme.md)** - - - ---- - -**Click here to [Patreon-ize](https://www.patreon.com/bcurran3) the package maintainer.** - ---- - #### [choco://gnu-units](choco://gnu-units) To use choco:// protocol URLs, install [(unofficial) choco:// Protocol support ](https://chocolatey.org/packages/choco-protocol-support) diff --git a/automatic/gnu-units/gnu-units.nuspec b/automatic/gnu-units/gnu-units.nuspec index fec976b54..c763a75d3 100644 --- a/automatic/gnu-units/gnu-units.nuspec +++ b/automatic/gnu-units/gnu-units.nuspec @@ -40,6 +40,7 @@ The units are defined in an external data file. You can use the extensive data f https://www.gnu.org/software/units/manual/ + diff --git a/automatic/gnu-units/tools/LICENSE.txt b/automatic/gnu-units/legal/LICENSE.txt similarity index 100% rename from automatic/gnu-units/tools/LICENSE.txt rename to automatic/gnu-units/legal/LICENSE.txt diff --git a/automatic/gnu-units/legal/VERIFICATION.txt b/automatic/gnu-units/legal/VERIFICATION.txt new file mode 100644 index 000000000..90e616fd4 --- /dev/null +++ b/automatic/gnu-units/legal/VERIFICATION.txt @@ -0,0 +1,17 @@ +VERIFICATION +Verification is intended to assist the Chocolatey moderators and community +in verifying that this package's contents are trustworthy. + +1. Download the installer: + + x32: https://sourceforge.net/projects/freeplane/files/freeplane%20stable/Freeplane-Setup-with-Java-1.12.5.exe/download + +2. You can use one of the following methods to obtain the checksum: + - Use powershell function 'Get-FileHash' + - Use Chocolatey utility 'checksum.exe' + - Using AU: + Get-RemoteChecksum https://sourceforge.net/projects/freeplane/files/freeplane%20stable/Freeplane-Setup-with-Java-1.12.5.exe/download + +3. Compare to Checksum: + + checksum32: d214c610141466289b5bd717447626c706bab9aebb4fc86b6091f26ae5335523 diff --git a/automatic/gnu-units/tools/ChocolateyInstall.ps1 b/automatic/gnu-units/tools/ChocolateyInstall.ps1 index 6ed1a1c6d..a913946a5 100644 --- a/automatic/gnu-units/tools/ChocolateyInstall.ps1 +++ b/automatic/gnu-units/tools/ChocolateyInstall.ps1 @@ -1,11 +1,12 @@ $ErrorActionPreference = 'Stop' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $packageName = 'gnu-units' +$file = Get-Item $toolsPath\*.exe $packageArgs = @{ packageName = $packageName fileType = 'EXE' - file = "$toolsDir\units-2.22-setup.exe" + file = $file validExitCodes = @(0) silentArgs = '/VERYSILENT /NOCANCEL /CLOSEAPPLICATIONS /RESTART APPLICATIONS /NORESTART' softwareName = 'units version 2.*' diff --git a/automatic/gnu-units/tools/VERIFICATION.txt b/automatic/gnu-units/tools/VERIFICATION.txt deleted file mode 100644 index 6902f47ee..000000000 --- a/automatic/gnu-units/tools/VERIFICATION.txt +++ /dev/null @@ -1,9 +0,0 @@ -==================== GNU Units ==================== - -This binary was directly downloaded and packaged up by bcurran3 from developer's site: - -"Windows Binary - -A binary distribution for Windows is available at http://ftp.gnu.org/gnu/units/windows/ (via HTTP) and ftp://ftp.gnu.org/gnu/units/windows (via FTP)." - -==================== GNU Units ==================== diff --git a/automatic/gnu-units/tools/units-2.22-setup.exe.sig b/automatic/gnu-units/tools/units-2.22-setup.exe.sig deleted file mode 100644 index af2d20bc2ca8cfb82986fc853fa3b84948e075c8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 287 zcmV+)0pR|L0UQJX0SEvF1p;FhefIzg2@pOgpOXe~q5^=52mp=9b3&CVuWzH(xWHQQ zjDOAyjLlWvZ~9Ui^EcgVOY0@*)>=a;&`uLDCx>4Y2adpHyoLQagBD2?E9feQjN(GW zfvgwW>O!dhkL~$6Fn~y4-E7qE>)Yi4AtWP0wRmAsg0IlHmS^qKj9aX*)!qt;*E+?| zdj}dn<5J~O1?sFhF&!=3LL$VAa{w;Qp7kLVUVb=);#mD3Lc6tUPmZ{Y2vQ!V-vP-W2~Et0H;9IQ8)rba|B lX!pq Date: Sun, 22 Sep 2024 12:15:29 +0200 Subject: [PATCH 3/3] script get checksum --- automatic/audioshell/update.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/automatic/audioshell/update.ps1 b/automatic/audioshell/update.ps1 index 77166032f..ab5ea259a 100644 --- a/automatic/audioshell/update.ps1 +++ b/automatic/audioshell/update.ps1 @@ -13,6 +13,13 @@ function global:au_SearchReplace { } } +function global:au_BeforeUpdate { + . ..\..\scripts\Get-FileVersion.ps1 + $FileVersion = Get-FileVersion $Latest.URL32 + $Latest.Checksum32 = $FileVersion.Checksum + $Latest.ChecksumType32 = $FileVersion.checksumType +} + function global:au_AfterUpdate($Package) { Invoke-VirusTotalScan $Package } @@ -31,4 +38,4 @@ function global:au_GetLatest { return $Latest } -update -ChecksumFor 32 -NoCheckChocoVersion \ No newline at end of file +update -ChecksumFor none \ No newline at end of file