-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
missing-checkver.ps1
41 lines (38 loc) · 1.24 KB
/
missing-checkver.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<#
.SYNOPSIS
Check if manifests have checkver and autoupdate property.
.DESCRIPTION
Check if manifests have checkver property.
.PARAMETER App
Manifest name.
.PARAMETER Dir
Directory where to search for manfiest.
Default to bucket folder.
.PARAMETER Rest
-s - Skip supported
.EXAMPLE
PS BUCKETROOT > .\bin\missing-checkver.ps1
Check all manifests inside root of bucket.
.EXAMPLE
PS BUCKETROOT > .\bin\missing-checkver.ps1 TODO
Check all manifests inside TODO directory.
.EXAMPLE
PS BUCKETROOT > .\bin\missing-checkver.ps1 -dir TODO
Check all manifests inside TODO directory.
#>
param(
[Parameter(ValueFromPipeline = $true)]
[Alias('App')]
[String] $Manifest = '*',
[ValidateScript( { if ( Test-Path $_ -Type Container) { $true } else { $false } })]
[String] $Dir = "$PSScriptRoot\..\bucket",
[Parameter(ValueFromRemainingArguments = $true)]
[String[]] $Rest = ''
)
begin {
if (-not $env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) }
$Dir = Resolve-Path $Dir
$Rest = $Rest -join ' '
}
process { Invoke-Expression -Command "$env:SCOOP_HOME\bin\missing-checkver.ps1 -App ""$Manifest"" -Dir ""$Dir"" $Rest" }
end { Write-Host 'DONE' -ForegroundColor Yellow }