From patchwork Tue Sep 26 12:08:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 19089 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 975DAC326B for ; Tue, 26 Sep 2023 12:08:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 00C8762944; Tue, 26 Sep 2023 14:08:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1695730103; bh=ui8TQVBWriK8F//nPXM4F8S8igRdcKuYshoP1OxXnvo=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=35BJU6+nBDVpqv1Mid3gqou2C9+WyKAAT9M5fBOEASzIAj+7J56WXvyvpJNXoY1lF zena2zixX1H2sv/+iIKuih1iZrQMcgDlQTTFXHANYq2CYPlJM9D4MwrNM2b1U4lKUj bj/5GS4WPJlW0bo3YK1NN4UmRzoF/vjiIWe+Lal3etpZAVsXduO31z1ebmEhV6w4kC H/cH0VMctJ4AEM3jlik7uJs060V1fOlb9/9onxhuaEjYnON2idI8vyHWsVh2Vz1SOw bnIQCE954oFFss4VqDK6CNsxlgewIXLQRlZWY5cZIfQgGUB9IjmiovmLKXgxSozz9b I5bLqqV/JfyHQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7011A61E0E for ; Tue, 26 Sep 2023 14:08:21 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="g6TPXKhm"; dkim-atps=neutral Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 65068842 for ; Tue, 26 Sep 2023 14:06:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1695730000; bh=ui8TQVBWriK8F//nPXM4F8S8igRdcKuYshoP1OxXnvo=; h=From:To:Subject:Date:From; b=g6TPXKhmwpAsH0/Ij0DwidK6DEeJ7hxJOAFsXgKGETGitHgqPMIFqjVZdreDO58tr TzM4QiNv+M2BJHoJ3vkIc39eBob5vuS2u79DBYf34YKEsu1GOiiNNufWBNlxjTJWuK mbnTXJUQTRxATCFjnvtp4BeAB1O28hT2uXYo+PZc= To: libcamera-devel@lists.libcamera.org Date: Tue, 26 Sep 2023 15:08:31 +0300 Message-ID: <20230926120831.8891-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] utils: update-kernel-headers: Support git worktrees X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Laurent Pinchart via libcamera-devel From: Laurent Pinchart Reply-To: Laurent Pinchart Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Kieran Bingham --- utils/update-kernel-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/update-kernel-headers.sh b/utils/update-kernel-headers.sh index a006452e6836..590986d2b7e2 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