1
0
Fork 0

Merge remote-tracking branch 'upstream/master'

pull/1472/head
Sergey Valkov 7 years ago
commit 766fc81028

@ -27,7 +27,7 @@ installed:
- *.lzma* requires `unlzma`. - *.lzma* requires `unlzma`.
- *.Z* requires `uncompress`. - *.Z* requires `uncompress`.
- *.zip*, *.jar* requires `unzip`. - *.zip*, *.jar* requires `unzip`.
- *.rar* requires `unrar` or `rar`. - *.rar* requires `rar` (needed for `archive` support), `unrar` or `lsar` and `unar`.
- *.7z* requires `7za`. - *.7z* requires `7za`.
- *.deb* requires `ar`, `tar`. - *.deb* requires `ar`, `tar`.

@ -43,9 +43,11 @@ while (( $# > 0 )); do
|| lzcat "$1" | tar x${verbose:+v}f - ;; || lzcat "$1" | tar x${verbose:+v}f - ;;
(*.tar) tar t${verbose:+v}f "$1" ;; (*.tar) tar t${verbose:+v}f "$1" ;;
(*.zip|*.jar) unzip -l${verbose:+v} "$1" ;; (*.zip|*.jar) unzip -l${verbose:+v} "$1" ;;
(*.rar) unrar &> /dev/null \ (*.rar) ( (( $+commands[unrar] )) \
&& unrar ${${verbose:+v}:-l} "$1" \ && unrar ${${verbose:+v}:-l} "$1" ) \
|| rar ${${verbose:+v}:-l} "$1" ;; || ( (( $+commands[rar] )) \
&& rar ${${verbose:+v}:-l} "$1" ) \
|| lsar ${verbose:+-l} "$1" ;;
(*.7z) 7za l "$1" ;; (*.7z) 7za l "$1" ;;
(*) (*)
print "$0: cannot list: $1" >&2 print "$0: cannot list: $1" >&2

@ -57,9 +57,11 @@ while (( $# > 0 )); do
(*.lzma) unlzma "$1" ;; (*.lzma) unlzma "$1" ;;
(*.Z) uncompress "$1" ;; (*.Z) uncompress "$1" ;;
(*.zip|*.jar) unzip "$1" -d $extract_dir ;; (*.zip|*.jar) unzip "$1" -d $extract_dir ;;
(*.rar) unrar &> /dev/null \ (*.rar) ( (( $+commands[unrar] )) \
&& unrar x -ad "$1" \ && unrar x -ad "$1" ) \
|| rar x -ad "$1" ;; || ( (( $+commands[rar] )) \
&& rar x -ad "$1" ) \
|| unar -d "$1" ;;
(*.7z) 7za x "$1" ;; (*.7z) 7za x "$1" ;;
(*.deb) (*.deb)
mkdir -p "$extract_dir/control" mkdir -p "$extract_dir/control"

Loading…
Cancel
Save