From 4517334d8a38a5e31a16d1d56f6ec7a58cb54d95 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 16 Jul 2021 14:11:03 +0300 Subject: [PATCH] kiss: store newline in variable --- kiss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kiss b/kiss index 52b94c7..d1b6ca4 100755 --- a/kiss +++ b/kiss @@ -938,8 +938,7 @@ pkg_checksums() { # Store the generated checksums in a string for use internally # without the need for subshells. - _hash="$_hash${_hash:+" -"}$hash" + _hash="$_hash${_hash:+"$newline"}$hash" esac done < "$repo_dir/sources" || die "$1" "Failed to generate checksums" } @@ -1635,8 +1634,7 @@ pkg_update() { # Detect repository orphans (installed packages with no # associated repository). case $repo_dir in */var/db/kiss/installed/*) - _repo_orp="$_repo_orp -${pkg##*/}" + _repo_orp="$_repo_orp$newline${pkg##*/}" esac # Compare installed packages to repository packages. @@ -1922,6 +1920,10 @@ main() { # in the filesystem. ppwd=$PWD + # Never know when you're gonna need one of these. + newline=" +" + # The PID of the current shell process is used to isolate directories # to each specific KISS instance. This allows multiple package manager # instances to be run at once. Store the value in another variable so