From a8e6559758803fb90e2425423b6658c5419eef39 Mon Sep 17 00:00:00 2001 From: merakor Date: Thu, 28 May 2020 08:23:58 +0000 Subject: kiss: don't define KISS_COMPRESS in a subshell FossilOrigin-Name: 9b8057b7da9acbb2794c25150547bc4e04d145db1aeab8ff3d9d6dc4b6533dfb --- kiss | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kiss b/kiss index 8d4c8ad..2f3ac3d 100755 --- a/kiss +++ b/kiss @@ -589,14 +589,14 @@ pkg_tar() { # Create a tarball from the contents of the built package. "$tar" cf - -C "$pkg_dir/$1" . | - case ${KISS_COMPRESS:=gz} in + case $KISS_COMPRESS in bz2) bzip2 -z ;; xz) xz -zT 0 ;; gz) gzip -6 ;; zst) zstd -3 ;; *) gzip -6 ;; # Fallback to gzip esac \ - > "$bin_dir/$1#$version-$release.tar.${KISS_COMPRESS:=gz}" + > "$bin_dir/$1#$version-$release.tar.$KISS_COMPRESS" log "$1" "Successfully created tarball" @@ -1628,6 +1628,9 @@ main() { # do nothing on a normal system. mkdir -p "$KISS_ROOT/" 2>/dev/null ||: + # Set a value for KISS_COMPRESS if it isn't set. + : "${KISS_COMPRESS:=gz}" + # A temporary directory can be specified apart from the cache # directory in order to build in a user specified directory. # /tmp could be used in order to build on ram, useful on SSDs. -- cgit v1.2.3