mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Inital commit.
This commit is contained in:
25
images/win/scripts/Installers/Validate-7zip.ps1
Normal file
25
images/win/scripts/Installers/Validate-7zip.ps1
Normal file
@@ -0,0 +1,25 @@
|
||||
################################################################################
|
||||
## File: Validate-7zip.ps1
|
||||
## Desc: Validate 7zip
|
||||
################################################################################
|
||||
|
||||
if (Get-Command -Name '7z')
|
||||
{
|
||||
Write-Host "7zip on path"
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host '7zip is not on path'
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Adding description of the software to Markdown
|
||||
$SoftwareName = "7zip"
|
||||
$(7z --help).Split([System.Environment]::NewLine)[1] -match "\d+\.\d+"
|
||||
$7zipVersion = $matches[0]
|
||||
|
||||
$Description = @"
|
||||
_Version:_ $7zipVersion<br/>
|
||||
"@
|
||||
|
||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
|
||||
Reference in New Issue
Block a user