cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 6ef1ba4714cf7a2414c850f9b8d32c1eeca1d5ef
parent 9731e06fee8e05d886f9a0e5e660a02e838f99ba
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon, 13 Apr 2020 14:54:45 +0300

kiss-export: honour KISS_COMPRESS value

Diffstat:
Mcontrib/kiss-export | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/contrib/kiss-export b/contrib/kiss-export @@ -18,6 +18,12 @@ while read -r file; do done < "$KISS_ROOT/var/db/kiss/installed/$pkg/manifest" # Turn the list of files back into a package. -tar czf "$pkg#$ver-$rel.tar.gz" -C / -- "$@" +KISS_COMPRESS="${KISS_COMPRESS:-gz}" +tar cf - -C / -- "$@" | case "$KISS_COMPRESS" in + bz2) bzip2 -z ;; + gz) gzip -6 ;; + xz) xz -zT 0 ;; + zst) zstd -3 ;; +esac > "$pkg#$ver-$rel.tar.$KISS_COMPRESS" -printf 'tarball created in %s\n' "$PWD/$pkg#$ver-$rel.tar.gz" +printf 'tarball created in %s\n' "$PWD/$pkg#$ver-$rel.tar.$KISS_COMPRESS"