aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-04-20 17:51:04 +0000
committermerakor <cem@ckyln.com>2020-04-20 17:51:04 +0000
commit27e7d70cc297f06b9bd10b976333c4d0a1305e0f (patch)
tree3d681a1cc36a8c52b39ecc403be4447522b180c6 /kiss
parent22100bc4f4a3c7e6e0eee88523677974f55108dc (diff)
downloadcpt-27e7d70cc297f06b9bd10b976333c4d0a1305e0f.tar.gz
kiss: display a warning for KISS_ROOT if it ends with '/'
FossilOrigin-Name: 35cefea72c6036d430f541c53f6cfd701b75cd85c9e576bb76c950d15e41aa70
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss5
1 files changed, 4 insertions, 1 deletions
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.