diff options
author | merakor <cem@ckyln.com> | 2020-04-13 11:54:45 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-04-13 11:54:45 +0000 |
commit | 2251a62bae596f06ddccd40c85d20e47833df96d (patch) | |
tree | 6541855dda3c7fa8ba4ad3adb6ef2328ecf30d9b /contrib/kiss-export | |
parent | 33c83ea2daefa2a5ae9e419c74e0928476cfd198 (diff) | |
download | cpt-2251a62bae596f06ddccd40c85d20e47833df96d.tar.gz |
kiss-export: honour KISS_COMPRESS value
FossilOrigin-Name: f20ec9d607db52eb32c998d812fb2e4b23698aceb7691b54ecceee356909f2c7
Diffstat (limited to 'contrib/kiss-export')
-rwxr-xr-x | contrib/kiss-export | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/kiss-export b/contrib/kiss-export index f8add7c..8260158 100755 --- 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" |