From 3682b30ee061d5fd0be08d28da714bb11b024ff0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 28 Jun 2013 11:56:11 -0400 Subject: [PATCH] website: fix issues with URL --- website/config.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/config.rb b/website/config.rb index 704db960f..6f712f906 100644 --- a/website/config.rb +++ b/website/config.rb @@ -18,8 +18,9 @@ if !ENV["PACKER_DISABLE_DOWNLOAD_FETCH"] response.body.split("\n").each do |line| next if line !~ /\/mitchellh\/packer\/(#{ENV["PACKER_VERSION"]}.+?)\?/ - filename = $1.to_s + filename = $1.to_s os = filename.split("_")[1] + next if os == "SHA256SUMS" $packer_files[os] ||= [] $packer_files[os] << filename @@ -59,7 +60,9 @@ end #------------------------------------------------------------------------- helpers do def download_arch(file) - file.split("_")[2].split(".")[0] + parts = file.split("_") + return "" if parts.length != 3 + parts[2].split(".")[0] end def download_os_human(os)