mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-09-21 00:01:14 +02:00
packer cmd command
This commit is contained in:
parent
61640f6bee
commit
193d1510b6
13
build.ps1
13
build.ps1
|
@ -7,7 +7,7 @@ $vagrantreloadMinVersion = "0.0.1"
|
|||
$packer = "packer.exe"
|
||||
$expectedVBoxLocation = "C:\Program Files\Oracle\VirtualBox"
|
||||
$expectedVagrantLocation="C:\HashiCorp\Vagrant\bin"
|
||||
$expectedPackerLocation="C\ProgramFiles\Packer"
|
||||
|
||||
|
||||
|
||||
function CompareVersions ($actualVersion, $expectedVersion, $exactMatch = $False) {
|
||||
|
@ -63,18 +63,9 @@ If (CompareVersions -actualVersion $vboxVersion -expectedVersion $virtualBoxMinV
|
|||
|
||||
}
|
||||
|
||||
If ($(Test-Path "$expectedPackerLocation\$packer.exe") -eq $True) {
|
||||
|
||||
$packerVersion = cmd.exe /c "$expectedPackerLocation/$packer" -v
|
||||
$packerVersion = cmd.exe /c "$packer" -v
|
||||
$packerVersion = $packerVersion.split(" ")[1]
|
||||
|
||||
} else {
|
||||
|
||||
Write-Host "packer is not installed (or not in the expected location of $expectedPackerLocation\)"
|
||||
Write-Host "Please download and install it from https://www.packer.io/downloads.html"
|
||||
exit
|
||||
|
||||
}
|
||||
|
||||
|
||||
If (CompareVersions -actualVersion $packerVersion -expectedVersion $packerMinVersion) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user