[WIP PATCH 02/30] scripts/coccicheck: modify to handle ${srctree} with trailing slash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These portions of the script would break if ${srctree} had a trailing
slash.  Since such a change is hoped for, ensure this script can handle
this situation.

Signed-off-by: Elliott Mitchell <ehem+linux@xxxxxxx>
---
An intermediate since for some versions need to handle both methods.
---
 scripts/coccicheck | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index e52cb43fede6..0395b6f943d4 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -210,7 +210,7 @@ coccinelle () {
 
     if [ $VERBOSE -ne 0 -a $ONLINE -eq 0 ] ; then
 
-	FILE=${COCCI#$srctree/}
+	FILE=${COCCI#${srctree%/}/}
 
 	echo "Processing `basename $COCCI`"
 	echo "with option(s) \"$OPT\""
-- 
2.39.2





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux