Add support for rar archives.

This commit is contained in:
Adam Vandenberg 2010-03-25 23:59:35 -07:00
parent 8ce7abce73
commit 0b56c62bf5

View File

@ -73,6 +73,8 @@ class CurlDownloadStrategy <AbstractDownloadStrategy
# TODO check if it's really a tar archive
safe_system '/usr/bin/tar', 'xf', @tarball_path
chdir
when 'Rar!'
quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, @tarball_path
else
# we are assuming it is not an archive, use original filename
# this behaviour is due to ScriptFileFormula expectations