extract: check file extension as lowercase (#6158)

Fixes #6157
This commit is contained in:
kapsh 2017-06-28 11:03:55 +03:00 committed by Marc Cornellà
parent 76d3eedf7f
commit 91b771914b

View File

@ -29,7 +29,7 @@ extract() {
success=0
extract_dir="${1:t:r}"
case "$1" in
case "${1:l}" in
(*.tar.gz|*.tgz) (( $+commands[pigz] )) && { pigz -dc "$1" | tar xv } || tar zxvf "$1" ;;
(*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;;
(*.tar.xz|*.txz)
@ -45,7 +45,7 @@ extract() {
(*.bz2) bunzip2 "$1" ;;
(*.xz) unxz "$1" ;;
(*.lzma) unlzma "$1" ;;
(*.Z) uncompress "$1" ;;
(*.z) uncompress "$1" ;;
(*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk) unzip "$1" -d $extract_dir ;;
(*.rar) unrar x -ad "$1" ;;
(*.7z) 7za x "$1" ;;