From patchwork Mon Apr 30 23:20:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Wilson X-Patchwork-Id: 906929 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-477025-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="lNHTE6fI"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40ZgWP1X5Bz9s27 for ; Tue, 1 May 2018 09:20:31 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=SpFPAcW4KSgf LA+wXMHiYZ0JAHdPnDzNKp6QYjwMd74XgXhHOqmNnmIwltnoeXi8RgnXNNBvaBPI ij3dS/7gBHyN9WS85SmdJsGMwKNmjBQVvBkgWq4sIF3d+1t//MlfzckM32YBkGj6 FXnVxL8kVleqYQmsMCQ2NL3Q243GqH8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=Y1NYwP1PLxyNTtfNxH YnLZAExBY=; b=lNHTE6fIRy0ZYmK4rE/uEqMeeNGCmnp6nCypR/qYee1VX503Mw UAHOLLFRXZXbaER/I1SaUDIb38a3mT0a20WXhnjvAH+Tq7dVKJFZ/NtMMw9KdI7K DICvldkoVOmHCC4FGDXfrzQ5brmVKpZrwZySioq/8UaN9MjieBJWIHpWY= Received: (qmail 107850 invoked by alias); 30 Apr 2018 23:20:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 107835 invoked by uid 89); 30 Apr 2018 23:20:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pf0-f182.google.com Received: from mail-pf0-f182.google.com (HELO mail-pf0-f182.google.com) (209.85.192.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 23:20:21 +0000 Received: by mail-pf0-f182.google.com with SMTP id w129so2489963pfd.3 for ; Mon, 30 Apr 2018 16:20:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vuW9nXw2fstDTTUjFp/M0IIGC39uAMDU6/F6OCaLZ0Y=; b=odZhVh4p1MQQ+re0uzNDLqNkLxaJlOHOZ1dhO7VHZAw0l3TsNATJeux7QPYDBlxee0 VMNvc3HuZC8epU4yv4n6Agrni1DjE7tcrCWjIS5nzL1SnIAkl5tGFghi/kr1V/fTewMC aJM3TBIHJu60MY0q02tu3u9VeORPMG9F2Y7MtLVWIUJVpeZSJdRQAblumytpukWTE4+F 3ILWhQiC79qCxTqWjg2TH2R3HH2ziGp9Gv5WVbPwXRCzmOdQZfhzHcAMdg2N3zEfM4H7 Qf90F6HPVSZcJ9T49TFcTbeAsB23fyp9ZfKKym5xiCVll9Pcwvt2c853O5gW7EG6LNZO 9mlg== X-Gm-Message-State: ALQs6tC1i9qRF2y87GhdUr8iif66NcBDJXZ6lrrUDf47BOxCWpymaM+P rh97AwQKjdr1blKkjO13zKSBpvHu41U= X-Google-Smtp-Source: AB8JxZpuLie0009434MmB2frBl+ZF7JsS/nVLs0OLB+7SVo12gKL6XQTclKm+yWwbUhxyLjpHdJ4Mg== X-Received: by 10.98.21.73 with SMTP id 70mr13676450pfv.91.1525130419870; Mon, 30 Apr 2018 16:20:19 -0700 (PDT) Received: from rohan.internal.sifive.com ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id f78sm16982451pfk.138.2018.04.30.16.20.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Apr 2018 16:20:18 -0700 (PDT) From: Jim Wilson To: gcc-patches@gcc.gnu.org Cc: Jim Wilson Subject: [PATCH] Add support for gcc as git submodule of another repository. Date: Mon, 30 Apr 2018 16:20:14 -0700 Message-Id: <20180430232014.10312-1-jimw@sifive.com> We have some github repos that use git submodule to include other repos, including gcc. When git submodule is used, .git is actually a file not a dir, and contains the path to the modules file in the parent repo's .git dir. This patch allows contrib/gcc_update to work in this situation. OK? Jim contrib/ * gcc_update: Check for .git as a file. --- contrib/gcc_update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/gcc_update b/contrib/gcc_update index a33bb543902..c9c71548f53 100755 --- a/contrib/gcc_update +++ b/contrib/gcc_update @@ -286,7 +286,7 @@ p esac # Check for known version control systems. -if [ -d .git ]; then +if [ -d .git ] || [ -f .git ]; then GCC_GIT=${GCC_GIT-${GIT-git}} vcs_type="git" elif [ -d .hg ]; then