diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-06-17 00:26:05 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-06-17 00:39:25 +0300 |
commit | 88e32bab5084efff7bda0247e4d1a9ab50dd7a71 (patch) | |
tree | 6dbc6fd9afd242d59d0f020e2f0bc0730c3439ef | |
parent | 2ca6e42ac500f4f9de50ad6d15dca2150cf070c4 (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-x | kbuild.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |