forked from kiss-community/kiss
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 <dylan.araps@gmail.com>
This commit is contained in:
parent
a6b79b79da
commit
a0f0b8b5ad
4
kiss
4
kiss
@ -1325,6 +1325,10 @@ main() {
|
|||||||
# This is used enough to warrant a place here.
|
# This is used enough to warrant a place here.
|
||||||
uid=$(id -u)
|
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
|
# This allows for automatic setup of a KISS chroot and will
|
||||||
# do nothing on a normal system.
|
# do nothing on a normal system.
|
||||||
mkdir -p "${sys_db:=$KISS_ROOT/$pkg_db}" 2>/dev/null ||:
|
mkdir -p "${sys_db:=$KISS_ROOT/$pkg_db}" 2>/dev/null ||:
|
||||||
|
Loading…
Reference in New Issue
Block a user