unpack: added *.rar

This commit is contained in:
Mikhail Tergoev
2025-06-26 08:38:29 +03:00
parent b00702c77f
commit a2b12327d4

View File

@ -240,11 +240,11 @@ unpack () {
print_info "Запуск распаковки архива $1" print_info "Запуск распаковки архива $1"
local command outarg local command outarg
case $1 in case $1 in
*.tar.xz) command="tar -Jxhf" ; outarg="-C " ;; *.tar.xz) command="tar -Jxhf" ; outarg="-C " ;;
*.tar.gz) command="tar -xhzf" ; outarg="-C " ;; *.tar.gz) command="tar -xhzf" ; outarg="-C " ;;
*.tar.zst) command="tar -I zstd -xhf" ; outarg="-C " ;; *.tar.zst) command="tar -I zstd -xhf" ; outarg="-C " ;;
*.tar) command="tar -xhf" ; outarg="-C " ;; *.tar) command="tar -xhf" ; outarg="-C " ;;
*.zip|*.exe) command="7z x -y" ; outarg="-o" ;; *.zip|*.exe|*.rar) command="7z x -y" ; outarg="-o" ;;
esac esac
create_new_dir "$2" create_new_dir "$2"
if $command "$1" ${outarg}"$2" ; then if $command "$1" ${outarg}"$2" ; then