From 27e7d70cc297f06b9bd10b976333c4d0a1305e0f Mon Sep 17 00:00:00 2001 From: merakor Date: Mon, 20 Apr 2020 17:51:04 +0000 Subject: kiss: display a warning for KISS_ROOT if it ends with '/' FossilOrigin-Name: 35cefea72c6036d430f541c53f6cfd701b75cd85c9e576bb76c950d15e41aa70 --- kiss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kiss b/kiss index 9b0244c..10e844d 100755 --- a/kiss +++ b/kiss @@ -1422,7 +1422,10 @@ main() { # Make sure that the KISS_ROOT doesn't end with a '/'. This might # break some operations. - KISS_ROOT=${KISS_ROOT%/} + [ -z "$KISS_ROOT" ] || [ "${KISS_ROOT##*/}" ] || { + log warning "Your KISS_ROOT variable shouldn't end with '/'" "!>" + KISS_ROOT=${KISS_ROOT%/} + } # This allows for automatic setup of a KISS chroot and will # do nothing on a normal system. -- cgit v1.2.3