From 022d4f9e77f591eba7866cf412b4a0ac5c0a3fc5 Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Wed, 8 Jul 2026 18:12:27 +0200 Subject: [PATCH] bugfix --- profile.d/compress.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/profile.d/compress.sh b/profile.d/compress.sh index fcdca84..3d1cc7b 100644 --- a/profile.d/compress.sh +++ b/profile.d/compress.sh @@ -200,6 +200,7 @@ utaz() printf "\t- tar.bz2, .tbz2\n" printf "\t- tar.xz, .txz\n" printf "\t- tar.lz, .tlz\n" + printf "\t- lzo\n" printf "\t- rar\n" printf "\t- arj\n" printf "\t- lha, lzh\n" @@ -284,6 +285,9 @@ utaz() extractor="_unxz" ;; *.tar.lz|*.tlz) + extractor="_unlzip" + ;; + *.lzo) extractor="_unlzop" ;; *.tar) @@ -465,7 +469,7 @@ taz() # shellcheck disable=SC2329 _dolz() { - local procopt="--threads $2" + local procopt=(--threads "$2") local command=plzip command -v plzip >/dev/null 2>&1 || { @@ -474,7 +478,7 @@ taz() return 127 } command=lzip - local procopt="" + local procopt=() [[ $2 -gt 1 ]] && disp W "lzip doesn't support multithreading, falling back to 1 thread." && disp W "Consider installing plzip to obtain multithreading abilities." @@ -482,7 +486,7 @@ taz() local opt=() [[ $4 ]] && opt=('-vv') - opt+=("$procopt") + opt+=("${procopt[@]}") # Compress with lzip (lzma) $command "${opt[@]}" --keep "-$3" "$1" @@ -493,7 +497,7 @@ taz() # shellcheck disable=SC2329 _dogz() { - local procopt="--processes $2" + local procopt=(--processes "$2") local command=pigz command -v pigz >/dev/null 2>&1 || { @@ -502,7 +506,7 @@ taz() return 127 } local command="gzip --compress" - local procopt="" + local procopt=() [[ $2 -gt 1 ]] && disp W "gzip doesn't support multithreading, falling back to 1 thread." && disp W "Consider installing pigz to obtain multithreading abilities." @@ -510,7 +514,7 @@ taz() local opt=() [[ $4 ]] && opt=('--verbose') - opt+=("$procopt") + opt+=("${procopt[@]}") # Compress with gzip $command "${opt[@]}" --keep "-$3" "$1" @@ -521,7 +525,7 @@ taz() # shellcheck disable=SC2329 _dobz2() { - local procopt="-p$2" + local procopt=("-p$2") local command=pbzip2 command -v pbzip2 >/dev/null 2>&1 || { @@ -530,7 +534,7 @@ taz() return 127 } local command=bzip2 - local procopt="" + local procopt=() [[ $2 -gt 1 ]] && disp W "bzip2 doesn't support multithreading, falling back to 1 thread." && disp W "Consider installing pbzip2 to obtain multithreading abilities." @@ -538,7 +542,7 @@ taz() local opt=() [[ $4 ]] && opt=('-v') - opt+=("$procopt") + opt+=("${procopt[@]}") # Compress with bz2 $command "${opt[@]}" --compress --keep "-$3" "$1"