diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-03-30 04:26:09 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-04-05 18:23:05 +0200 |
commit | 93b9d6ca0562d8a2fcc44bd2d7d73dfc1cba9191 (patch) | |
tree | b02d027a75a1d177127a1a1fda811f4a935d6ade | |
parent | 7fae5d75e19c9d6337038da2301c7619db1d030b (diff) | |
download | mbuto-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-x | mbuto | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |