kiss: strip all trailing slashes from KISS_ROOT. thanks E5ten

This commit is contained in:
Dylan Araps 2020-09-23 21:56:30 +03:00
parent e1fa886562
commit 7bc3a0eb92
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 2 additions and 4 deletions

6
kiss
View File

@ -1515,10 +1515,8 @@ main() {
# This is used enough to warrant a place here.
uid=$(id -u)
# (lazily) ensure that the KISS_ROOT doesn't end with a '/'.
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}