summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-06-17 00:26:05 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-06-17 00:39:25 +0300
commit88e32bab5084efff7bda0247e4d1a9ab50dd7a71 (patch)
tree6dbc6fd9afd242d59d0f020e2f0bc0730c3439ef
parent2ca6e42ac500f4f9de50ad6d15dca2150cf070c4 (diff)
kbuild: Avoid false matches in directory pattern
Require matches for the directory pattern to be a full directory name, to reduce the risk of false matches. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-xkbuild.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/kbuild.sh b/kbuild.sh
index 93df105..c548718 100755
--- a/kbuild.sh
+++ b/kbuild.sh
@@ -156,7 +156,7 @@ if [[ -z "$platform" || "$platform" == "auto" ]] ; then
pattern=$(cat $f | grep "dir_pattern=" | head -1)
pattern=${pattern/#dir_pattern=/}
if [[ -n "$pattern" ]] ; then
- echo "$kernel_root" | grep -q "$pattern" || continue
+ echo "$kernel_root" | grep -q "/$pattern/" || continue
platform=$(basename -s .sh $f)
break
fi