From 4b09b2fcfa249232c1d60d851a28aaabc9b9b7e8 Mon Sep 17 00:00:00 2001 From: merakor Date: Tue, 10 Aug 2021 22:18:35 +0000 Subject: cpt-lib: use a better way of trimming slashes on CPT_ROOT FossilOrigin-Name: d25b1bf25a26fc22560d057530e4ca89fde8e9d87838c590c0eb6e4367842264 --- src/cpt-lib.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 41daf05..adfcb0c 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -2205,10 +2205,7 @@ create_cache() { # Make sure that the CPT_ROOT doesn't end with a '/'. This might # break some operations. - [ -z "$CPT_ROOT" ] || [ "${CPT_ROOT##*/}" ] || { - warn "" "Your CPT_ROOT variable shouldn't end with '/'" - CPT_ROOT=${CPT_ROOT%/} - } + CPT_ROOT=${CPT_ROOT%"${CPT_ROOT##*[!/]}"} # Define an optional sys_arch variable in order to provide # information to build files with architectural information. -- cgit v1.2.3