summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-09-26 02:10:15 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-10-18 16:17:18 +0300
commitd2094a0185647666ca8f810265521f0b892c4646 (patch)
treec11fae9863bc2abfb69753c827cf64f5d59e4faa
parentd848d2a21cac21b1189e641347d0869eb77744b4 (diff)
utils: update-kernel-headers: Support git worktrees
When operating on a git worktree, the Linux kernel directory contains a .git file, not a .git directory. Relax the git tree check to support both. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rwxr-xr-xutils/update-kernel-headers.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/update-kernel-headers.sh b/utils/update-kernel-headers.sh
index a006452e..590986d2 100755
--- a/utils/update-kernel-headers.sh
+++ b/utils/update-kernel-headers.sh
@@ -18,7 +18,7 @@ if [ "$line" != "# Kbuild for top-level directory of the kernel" ] ; then
exit 1
fi
-if [ ! -d "${kernel_dir}/.git" ] ; then
+if [ ! -e "${kernel_dir}/.git" ] ; then
echo "Directory ${kernel_dir} doesn't contain a git tree"
exit 1
fi