mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-09-22 05:15:54 +00:00
- Fix bug presented in https://github.com/lukesampson/scoop/commit/2a2c2059e00e3cca9fd87d1cacf0352bd39cfb0e#diff-67e44d47bfea08ffe769c6adc77f7215R22 - Missed $ before the bracket - Add `App` parameter - Format
45 lines
1.2 KiB
PowerShell
45 lines
1.2 KiB
PowerShell
<#
|
|
.SYNOPSIS
|
|
Check if manifest contains checkver and autoupdate property.
|
|
.PARAMETER App
|
|
Manifest name.
|
|
Wirldcard is supported.
|
|
.PARAMETER Dir
|
|
Location of manifests.
|
|
.PARAMETER SkipSupported
|
|
Manifests with checkver and autoupdate will not be presented.
|
|
#>
|
|
param(
|
|
[String] $App = '*',
|
|
[String] $Dir = "$PSScriptRoot\..\bucket",
|
|
[Switch] $SkipSupported
|
|
)
|
|
|
|
. "$PSScriptRoot\..\lib\core.ps1"
|
|
. "$PSScriptRoot\..\lib\manifest.ps1"
|
|
|
|
$Dir = Resolve-Path $Dir
|
|
|
|
Write-Host '[' -NoNewLine
|
|
Write-Host 'C' -NoNewLine -ForegroundColor Green
|
|
Write-Host ']heckver'
|
|
Write-Host ' | [' -NoNewLine
|
|
Write-Host 'A' -NoNewLine -ForegroundColor Cyan
|
|
Write-Host ']utoupdate'
|
|
Write-Host ' | |'
|
|
|
|
Get-ChildItem $Dir "$App.json" | ForEach-Object {
|
|
$json = parse_json "$Dir\$($_.Name)"
|
|
|
|
if ($SkipSupported -and $json.checkver -and $json.autoupdate) { return }
|
|
|
|
Write-Host '[' -NoNewLine
|
|
Write-Host $(if ($json.checkver) { 'C' } else { ' ' }) -NoNewLine -ForegroundColor Green
|
|
Write-Host ']' -NoNewLine
|
|
|
|
Write-Host '[' -NoNewLine
|
|
Write-Host $(if ($json.autoupdate) { 'A' } else { ' ' }) -NoNewLine -ForegroundColor Cyan
|
|
Write-Host '] ' -NoNewLine
|
|
Write-Host (strip_ext $_.Name)
|
|
}
|