From a0f0b8b5ad62752d556bf1e6ed48f2dc80d3a465 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Wed, 15 Apr 2020 11:26:43 +0300 Subject: [PATCH] kiss: fix possible KISS_ROOT usage If the user defines KISS_ROOT to / or anything that ends with '/', some functions will not work as intended (like fixdeps). This removes the '/' at the very end, if it exists. Signed-off-by: Dylan Araps --- kiss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kiss b/kiss index 29871a6..276975c 100755 --- a/kiss +++ b/kiss @@ -1325,6 +1325,10 @@ 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. + KISS_ROOT=${KISS_ROOT%/} + # This allows for automatic setup of a KISS chroot and will # do nothing on a normal system. mkdir -p "${sys_db:=$KISS_ROOT/$pkg_db}" 2>/dev/null ||: