aboutgitcode
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-03-30 04:26:09 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-04-05 18:23:05 +0200
commit93b9d6ca0562d8a2fcc44bd2d7d73dfc1cba9191 (patch)
treeb02d027a75a1d177127a1a1fda811f4a935d6ade
parent7fae5d75e19c9d6337038da2301c7619db1d030b (diff)
downloadmbuto-93b9d6ca0562d8a2fcc44bd2d7d73dfc1cba9191.tar
mbuto-93b9d6ca0562d8a2fcc44bd2d7d73dfc1cba9191.tar.gz
mbuto-93b9d6ca0562d8a2fcc44bd2d7d73dfc1cba9191.tar.bz2
mbuto-93b9d6ca0562d8a2fcc44bd2d7d73dfc1cba9191.tar.lz
mbuto-93b9d6ca0562d8a2fcc44bd2d7d73dfc1cba9191.tar.xz
mbuto-93b9d6ca0562d8a2fcc44bd2d7d73dfc1cba9191.tar.zst
mbuto-93b9d6ca0562d8a2fcc44bd2d7d73dfc1cba9191.zip
mbuto: Fix lz4 command line
lz4 needs an explicit output file if we're not compressing to stdout. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-xmbuto7
1 files changed, 5 insertions, 2 deletions
diff --git a/mbuto b/mbuto
index 45a12e5..23eaf6e 100755
--- a/mbuto
+++ b/mbuto
@@ -344,9 +344,12 @@ cpio_compress() {
[ "${COMPRESS}" = "lzo" ] && __cmd="lzop" || __cmd="${COMPRESS}"
cmd_check "${__cmd}"
- [ "${__cmd}" = "lz4" ] && __opt="-l" || __opt="-S .lz4"
+ if [ "${__cmd}" = "lz4" ]; then
+ "${__cmd}" -l -f -q -9 "${1}" "${1}.lz4"
+ else
+ "${__cmd}" -f -q -9 -S .lz4 "${1}"
+ fi
- "${__cmd}" ${__opt} -f -q -9 "${1}"
mv "${1}.lz4" "${1}"
return