examples/downloader.rb in compass-0.10.0.rc3 vs examples/downloader.rb in compass-0.10.0.rc4
- old
+ new
@@ -26,13 +26,13 @@
def install_from_github(user, project, ext_name, branch = "master", working_directory = Dir.pwd)
download_link = "http://github.com/#{user}/#{project}/zipball/#{branch}"
extdir = File.join(working_directory,'extensions')
- if !File.exists?(extdir)
+ if !File.exists?("#{extdir}/#{ext_name}")
begin
puts "Downloading the #{ext_name} plugin into #{extdir}."
- FileUtils.mkdir(extdir)
+ FileUtils.mkdir_p("#{extdir}")
zipfile = File.join(extdir, "#{ext_name}.zip")
open(zipfile, "wb") do |tgz|
tgz << fetch(download_link).body
end
puts "Unzipping the #{ext_name} plugin."