lib/remote_file_target.rb in sprout-0.5.0 vs lib/remote_file_target.rb in sprout-0.5.9
- old
+ new
@@ -7,11 +7,11 @@
:sprout,
:archive_type,
:archive_path,
:install_path,
:project_path,
- :post_install
+ :post_install,
:mount_path
attr_reader :downloaded_path,
:file_name,
:copy_path
@@ -23,11 +23,14 @@
if(url.nil? || url == '')
return
end
@file_name = url.split('/').pop
@downloaded_path = File.join(Sprout.cache, type, install_path, file_name)
- a_type = (archive_type == 'txt') ? nil : archive_type
- @install_path = File.join(Sprout.cache, type, install_path, a_type)
+ if(archive_type == 'txt' || archive_type == 'exe')
+ @install_path = File.join(Sprout.cache, type, install_path)
+ else
+ @install_path = File.join(Sprout.cache, type, install_path, archive_type)
+ end
@copy_path = File.join(install_path, archive_path)
loader = RemoteFileLoader.new
if(Sprout.update || !File.exists?(downloaded_path))
# retrieve from the network