From 02239b8021771f96788497c79161fb078898c576 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 6 Apr 2017 14:05:35 -0700 Subject: [PATCH] fix tar priority --- ex | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ex b/ex index ff8edb7..cd9bd78 100755 --- a/ex +++ b/ex @@ -28,6 +28,12 @@ Note: dtrx (package & command) extracts most of these plus some others." local x super for x in "$@"; do case "$x" in + # tars first, so they are higher pri than non-tar extensions + *.tar ) tar xf "$x" ;; + *.tar.bz2 | *.tbz2 ) tar xjf "$x" ;; + *.tar.gz | *.tgz ) tar xzf "$x" ;; + *.tar.xz ) tar Jxf "$x" ;; + *.xz) xz -d "$x" ;; *.7z ) 7za x "$x" ;; *.bz2 ) bunzip2 "$x" ;; *.deb ) ar x "$x" ;; @@ -50,11 +56,6 @@ Note: dtrx (package & command) extracts most of these plus some others." *.r[0-9][0-9]|*.rar ) unrar x "$x" ;; *.rpm ) rpm2cpio "$x" | cpio --extract --make-directories ;; *.sfs) $super unsquashfs "$x" ;; - *.tar ) tar xf "$x" ;; - *.tar.bz2 | *.tbz2 ) tar xjf "$x" ;; - *.tar.gz | *.tgz ) tar xzf "$x" ;; - *.tar.xz ) tar Jxf "$x" ;; - *.xz) xz -d "$x" ;; *.Z ) uncompress "$x" ;; *.zip|*.xpi ) unzip "$x" ;; -- 2.30.2