Skip to content

Commit

Permalink
#11 download vagrant insecure private key as part of install process …
Browse files Browse the repository at this point in the history
…on win & mac/linux
  • Loading branch information
mhewedy committed Aug 21, 2020
1 parent dd4169f commit b3e1f2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ Function Get-Archive($channel, $version) {

if(!$version -Or $version -eq "latest") {
$version=(Get-RedirectedUrl "https://github.com/mhewedy/vermin/releases/latest").Split("/")[7]
}
}

$vermin_url="$packagesRootUrl/${version}/vermin-${version}-windows.zip"
$vermin_url="$packagesRootUrl/${version}/vermin-${version}-windows.zip"
$sha_url="$vermin_url.sha256sum"
$hab_dest = (Join-Path ($workdir) "vermin.zip")
$sha_dest = (Join-Path ($workdir) "vermin.zip.shasum256")
Expand Down Expand Up @@ -100,7 +100,7 @@ Function Assert-Shasum($archive) {
}

Function Install-Vermin {
$habPath = Join-Path $env:ProgramData Vermin
$habPath = Join-Path $env:ProgramData Vermin
if(Test-Path $habPath) { Remove-Item $habPath -Recurse -Force }
New-Item $habPath -ItemType Directory | Out-Null
$folder = (Get-ChildItem (Join-Path ($workdir) "vermin.exe"))
Expand Down Expand Up @@ -166,6 +166,7 @@ Function Configure-Vermin() {
if(! (Test-Path "$HOME/.vermin/images")) { New-Item "$HOME/.vermin/images" -ItemType Directory | Out-Null}

wget https://raw.githubusercontent.com/mhewedy/vermin/master/etc/keys/vermin_rsa -o "$HOME/.vermin/vermin_rsa"
wget https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant -o "$HOME/.vermin/vagrant_insecure_private_key"
}

Function Configure-Virtualbox() {
Expand Down Expand Up @@ -226,7 +227,7 @@ function Get-RedirectedUrl() {
} else {
throw $_
}
}
}
} while($retry)

return $result
Expand Down
2 changes: 2 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ configure_vermin() {
mkdir -pv "$HOME/.vermin/images"
curl -s https://raw.githubusercontent.com/mhewedy/vermin/master/etc/keys/vermin_rsa > "$HOME/.vermin/vermin_rsa"
chmod 0600 "$HOME/.vermin/vermin_rsa"
curl -s https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant > "$HOME/.vermin/vagrant_insecure_private_key"
chmod 0600 "$HOME/.vermin/vagrant_insecure_private_key"
;;
*)
exit_with "Unrecognized sys when installing: ${sys}" 5
Expand Down

0 comments on commit b3e1f2a

Please sign in to comment.