From aa483a40861d42d3ff4873397fb3f783b5207024 Mon Sep 17 00:00:00 2001 From: Hsiao-nan Cheung Date: Mon, 19 Oct 2026 00:50:57 +0800 Subject: [PATCH] (chore): Sync bin helper scripts with the bucket template --- bin/auto-pr.ps1 | 6 +++--- bin/checkhashes.ps1 | 4 ++++ bin/checkurls.ps1 | 4 ++-- bin/checkver.ps1 | 4 ++-- bin/formatjson.ps1 | 4 ++-- bin/missing-checkver.ps1 | 4 ++-- 6 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 bin/checkhashes.ps1 diff --git a/bin/auto-pr.ps1 b/bin/auto-pr.ps1 index 8873ed1e029..a59486520b2 100644 --- a/bin/auto-pr.ps1 +++ b/bin/auto-pr.ps1 @@ -1,9 +1,9 @@ param( # overwrite upstream param - [String]$upstream = "ScoopInstaller/Java:master" + [String]$Upstream = 'ScoopInstaller/Java:master' ) -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } +if (!$env:SCOOP_HOME) { $env:SCOOP_HOME = Convert-Path (scoop prefix scoop) } $autopr = "$env:SCOOP_HOME/bin/auto-pr.ps1" $dir = "$PSScriptRoot/../bucket" # checks the parent dir -Invoke-Expression -command "& '$autopr' -dir '$dir' -upstream $upstream $($args | ForEach-Object { "$_ " })" +& $autopr -Dir $dir -Upstream $Upstream @Args diff --git a/bin/checkhashes.ps1 b/bin/checkhashes.ps1 new file mode 100644 index 00000000000..6e7e0526482 --- /dev/null +++ b/bin/checkhashes.ps1 @@ -0,0 +1,4 @@ +if (!$env:SCOOP_HOME) { $env:SCOOP_HOME = Convert-Path (scoop prefix scoop) } +$checkhashes = "$env:SCOOP_HOME/bin/checkhashes.ps1" +$dir = "$PSScriptRoot/../bucket" # checks the parent dir +& $checkhashes -Dir $dir @Args diff --git a/bin/checkurls.ps1 b/bin/checkurls.ps1 index cfe5e7d6034..4895d54667c 100644 --- a/bin/checkurls.ps1 +++ b/bin/checkurls.ps1 @@ -1,4 +1,4 @@ -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } +if (!$env:SCOOP_HOME) { $env:SCOOP_HOME = Convert-Path (scoop prefix scoop) } $checkurls = "$env:SCOOP_HOME/bin/checkurls.ps1" $dir = "$PSScriptRoot/../bucket" # checks the parent dir -Invoke-Expression -command "& '$checkurls' -dir '$dir' $($args | ForEach-Object { "$_ " })" +& $checkurls -Dir $dir @Args diff --git a/bin/checkver.ps1 b/bin/checkver.ps1 index 6f6b53a0541..9bce8b4c641 100644 --- a/bin/checkver.ps1 +++ b/bin/checkver.ps1 @@ -1,4 +1,4 @@ -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } +if (!$env:SCOOP_HOME) { $env:SCOOP_HOME = Convert-Path (scoop prefix scoop) } $checkver = "$env:SCOOP_HOME/bin/checkver.ps1" $dir = "$PSScriptRoot/../bucket" # checks the parent dir -Invoke-Expression -command "& '$checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })" +& $checkver -Dir $dir @Args diff --git a/bin/formatjson.ps1 b/bin/formatjson.ps1 index 188458310f0..2766bbce5d9 100644 --- a/bin/formatjson.ps1 +++ b/bin/formatjson.ps1 @@ -1,4 +1,4 @@ -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } +if (!$env:SCOOP_HOME) { $env:SCOOP_HOME = Convert-Path (scoop prefix scoop) } $formatjson = "$env:SCOOP_HOME/bin/formatjson.ps1" $path = "$PSScriptRoot/../bucket" # checks the parent dir -Invoke-Expression -command "& '$formatjson' -dir '$path' $($args | ForEach-Object { "$_ " })" +& $formatjson -Dir $path @Args diff --git a/bin/missing-checkver.ps1 b/bin/missing-checkver.ps1 index bca8abb073a..e37570470ca 100644 --- a/bin/missing-checkver.ps1 +++ b/bin/missing-checkver.ps1 @@ -1,4 +1,4 @@ -if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) } +if (!$env:SCOOP_HOME) { $env:SCOOP_HOME = Convert-Path (scoop prefix scoop) } $missing_checkver = "$env:SCOOP_HOME/bin/missing-checkver.ps1" $dir = "$PSScriptRoot/../bucket" # checks the parent dir -Invoke-Expression -command "& '$missing_checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })" +& $missing_checkver -Dir $dir @Args