commit 311a07af86a4120eeba7341588f2f4ab412059e4
parent ba8a9cffa5bc4874b2fd81c2e96d6aaa0853b17d
Author: Cem Keylan <cem@ckyln.com>
Date: Thu, 28 May 2020 11:23:58 +0300
kiss: don't define KISS_COMPRESS in a subshell
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git 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.