From e98d15936634518ebbaddf23d9ebfea11100ff2f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 6 Nov 2020 08:48:15 +0200 Subject: [PATCH] ensure KISS_ROOT doesn't end in a / --- kiss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kiss b/kiss index 34fe4e6..c315a47 100755 --- a/kiss +++ b/kiss @@ -1645,9 +1645,8 @@ main() { # This is used enough to warrant a place here. uid=$(id -u) - # Make sure that the KISS_ROOT doesn't end with a '/'. This might break - # some operations if left unchecked. - KISS_ROOT=${KISS_ROOT%/} KISS_ROOT=${KISS_ROOT%/} KISS_ROOT=${KISS_ROOT%/} + # Ensure that the KISS_ROOT doesn't end with a '/'. + KISS_ROOT=${KISS_ROOT%"${KISS_ROOT##*[!/]}"} # Define some paths which we will then use throughout the script. sys_db=$KISS_ROOT/${pkg_db:=var/db/kiss/installed}