Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clean up some regex conditionals

  • Loading branch information...
commit 5ba79209343a9937d19b2110df708e21b2b5c84e 1 parent ef96376
@Azolo Azolo authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 rake/extracttask.rb
View
6 rake/extracttask.rb
@@ -23,11 +23,9 @@ def extract(file, target, options = {})
# tar.z, tar.gz, tar.bz2 and tar.lzma contains .tar files inside, use bsdtar to
# extract the files directly to target directory without the need to first
# extract to a temporary directory as when using 7za.exe
- when /(^.+\.tar)\.z$/, /(^.+\.tar)\.gz$/, /(^.+\.tar)\.bz2$/, /(^.+\.tar)\.lzma$/
+ when /^.+\.(tar\.(z|gz|bz2|lzma)|tgz)$/
bsd_tar_extract(target, file, options)
- when /(^.+)\.tgz$/
- bsd_tar_extract(target, file, options)
- when /^.+\.zip$/, /^.+\.7z$/
+ when /^.+\.(zip|7z)$/
seven_zip(target, file)
else
raise "Unknown file extension! (for file #{file})"
Please sign in to comment.
Something went wrong with that request. Please try again.