aboutsummaryrefslogtreecommitdiff
path: root/litterbox
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-08-26 17:51:48 -0400
committerB. Watson <urchlay@slackware.uk>2026-08-26 17:51:48 -0400
commit076ce76e392f37c8c0520b528668f0ccb90e204f (patch)
treef824ce01891ee8e986f0ad1ac24644406a36566a /litterbox
parent9d7e3b4b8e35469fd2bded70e0ee473e4afc46de (diff)
downloadmisc-scripts-076ce76e392f37c8c0520b528668f0ccb90e204f.tar.gz
litterbox: disable all compression if gzip/zip are missing.
Diffstat (limited to 'litterbox')
-rwxr-xr-xlitterbox3
1 files changed, 2 insertions, 1 deletions
diff --git a/litterbox b/litterbox
index 1159de9..499fe9d 100755
--- a/litterbox
+++ b/litterbox
@@ -226,7 +226,6 @@ shift $(($OPTIND - 1))
# sanity check options and external binaries' existence.
[ "$GZIP" = 1 -a "$ZIP" = 1 ] && die "can't give both -g and -z"
-[ "$GZIP" = 1 -o "$ZIP" = 1 ] && COMPRESS=1
if [ "$ZIP" = 1 ] && ! check_path zip; then
warn "can't find zip on PATH, disabling -z option"
@@ -238,6 +237,8 @@ if [ "$GZIP" = 1 ] && ! check_path gzip; then
GZIP=0
fi
+[ "$GZIP" = 1 -o "$ZIP" = 1 ] && COMPRESS=1
+
if [ "$DOWNLOAD" = 1 -o "$ENC" = 1 ]; then
check_path openssl || die "can't find openssl on path, -c/-d won't work"
fi