Browse files

Clean up some regex conditionals

  • Loading branch information...
1 parent ef96376 commit 5ba79209343a9937d19b2110df708e21b2b5c84e @Azolo Azolo committed May 22, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 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)
raise "Unknown file extension! (for file #{file})"

0 comments on commit 5ba7920

Please sign in to comment.