Permalink
Browse files

allow passing pre-downloaded file path to source()

We cannot rely on source packages being available online forever!
  • Loading branch information...
1 parent b4f633e commit 77c1c03d0cd007ba72b0364d9579f4d9a6d36203 Chetan Patil committed with sunaku Oct 5, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/sprinkle/installers/source.rb
@@ -97,7 +97,11 @@ def prepare_commands #:nodoc:
end
def download_commands #:nodoc:
- [ "wget -cq --directory-prefix='#{@options[:archives]}' #{@source}" ]
+ if File.exist? @source
+ [ "cp #{@source} #{@options[:archives]}/#{archive_name}" ]
+ else
+ [ "wget -cq --directory-prefix='#{@options[:archives]}' #{@source}" ]
+ end
end
def extract_commands #:nodoc:

0 comments on commit 77c1c03

Please sign in to comment.