From 421c805210b0dcfd3f49521f4ac4f43db80be106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Sun, 20 Mar 2022 11:25:05 +0800 Subject: compress: standard commands --- hyperterm/tools/compress.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'hyperterm/tools') diff --git a/hyperterm/tools/compress.sh b/hyperterm/tools/compress.sh index bfb92b0..767d77e 100644 --- a/hyperterm/tools/compress.sh +++ b/hyperterm/tools/compress.sh @@ -5,18 +5,18 @@ function ex() { if [ -f "$1" ] ; then # shellcheck disable=SC2221,SC2222 case "$1" in - *.tar.bz2) tar xjf "$1" ;; - *.tar.gz) tar xzf "$1" ;; - *.tar.xz) tar xf "$1" ;; - *.tar.lz) tar xvf "$1" ;; + *.tar.bz2) tar -xjf "$1" ;; + *.tar.gz) tar -xzf "$1" ;; + *.tar.xz) tar -xf "$1" ;; + *.tar.lz) tar -xvf "$1" ;; *.lz) lzip -d "$1" ;; *.7z) 7z x "$1" ;; *.bz2) bunzip2 "$1" ;; *.gz) gunzip "$1" ;; *.rar) unar "$1" ;; - *.tar) tar xf "$1" ;; - *.tbz2) tar xjf "$1" ;; - *.tgz) tar xzf "$1" ;; + *.tar) tar -xf "$1" ;; + *.tbz2) tar -xjf "$1" ;; + *.tgz) tar -xzf "$1" ;; *.xz) unxz "$1" ;; *.Z) uncompress "$1" ;; *.zip) unzip "$1" ;; @@ -80,7 +80,7 @@ function cex() { 3) gzip --best --keep "$1" ;; 4) tar -c "$1" | bzip2 > "${1}.tar.bz2" ;; 5) tar -czvf "${1}.tar.gz" "$1" ;; - 6) tar cJvf "${1}.tar.xz" "$1" ;; + 6) tar -cJvf "${1}.tar.xz" "$1" ;; 7) tar -cvf "${1}.tar.lz" --lzip "$1" ;; 8) tar -cvf "${1}.tar" "$1" ;; 9) tar -c "$1" | bzip2 > "${1}.tbz2" ;; @@ -98,7 +98,7 @@ function cex() { 1) 7z a "${1%/}.7z" "$1" ;; 2) tar -c "$1" | bzip2 > "${1%/}.tar.bz2" ;; 3) tar -czvf "${1%/}.tar.gz" "$1" ;; - 4) tar cJvf "${1%/}.tar.xz" "$1" ;; + 4) tar -cJvf "${1%/}.tar.xz" "$1" ;; 5) tar -cvf "${1%/}.tar.lz" --lzip "${1}" ;; 6) tar -cvf "${1%/}.tar" "$1" ;; 7) tar -c "$1" | bzip2 > "${1%/}.tbz2" ;; -- cgit v1.2.3