Skip to content
Henrik edited this page Aug 21, 2014 · 1 revision

Unzip files in a ZIP archive.

desc "Unzip this killer archive"
unzip :unzip do |zip|
  zip.file = "archive.zip"
  zip.destination = "path/to/foo"
  zip.force
end

Required Parameters

File

The source ZIP archive filename.

file = "archive.zip"

Destination

Where to extract the ZIP archive to. For the current directory, which should be the directory containing the rakefile, use ".". If you've managed to change directories, use File.dirname __FILE__ to find the rakefile directory, instead.

destination = "path/to/foo"

Optional Parameters

Force

Overwrite existing files at the extraction destination.

force

Guidance

(none)

Clone this wiki locally