Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow passing pre-downloaded file path to source()

We cannot rely on source packages being available online forever!
  • Loading branch information...
commit 77c1c03d0cd007ba72b0364d9579f4d9a6d36203 1 parent b4f633e
Chetan Patil authored sunaku committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/sprinkle/installers/source.rb
View
6 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:
Please sign in to comment.
Something went wrong with that request. Please try again.