add unrar support (for broken rar packages not handled by 7zip)

This commit is contained in:
Mario Fetka 2012-02-18 15:18:46 +01:00
parent 088460ba47
commit c26374d993
2 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@ builder_config() {
# Define commands
CMD_7z="`which 7z`" ; builder_check_error "Command '7z' not installed"
CMD_unzip="`which unzip`" ; builder_check_error "Command 'unzip' not installed"
CMD_unrar="`which unrar`" ; builder_check_error "Command 'unrar' not installed"
CMD_zip="`which zip`" ; builder_check_error "Command 'zip' not installed"
CMD_unix2dos="`which unix2dos`" ; builder_check_error "Command 'unix2dos' not installed"
CMD_identify="`which identify`" ; builder_check_error "Command 'identify' (ImageMagick) not installed"

View File

@ -60,6 +60,8 @@ function process_file() {
$CMD_7z x -o$dst $src
elif [ "$format" = "unzip" ]; then
$CMD_unzip $src -d $dst
elif [ "$format" = "unrar" ]; then
$CMD_unrar x $src $dst
else
fatal_error "Unknown compression format: $format"
fi