aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-04-15 08:26:43 +0000
committermerakor <cem@ckyln.com>2020-04-15 08:26:43 +0000
commit165e385f85c78cca76487fd3f99ac06678140aeb (patch)
tree5073fc5bff154747ca3a7003f9998f8fe5f8efc4 /kiss
parentdb35d1ddd7afe2ce40ebdedca80ecbe3c5b358ca (diff)
downloadcpt-165e385f85c78cca76487fd3f99ac06678140aeb.tar.gz
kiss: fix possible KISS_ROOT usage
FossilOrigin-Name: ae9356f6f103dacf7cb86c5e353f24546ccbb06f43b6b5d358bec75f700d6e58
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss4
1 files changed, 4 insertions, 0 deletions
diff --git a/kiss b/kiss
index 25ccfe7..7ddca39 100755
--- a/kiss
+++ b/kiss
@@ -1394,6 +1394,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 ||: