From patchwork Tue Jun 28 02:10:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Gallager X-Patchwork-Id: 641300 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3rdq6k56z1z9sBf for ; Tue, 28 Jun 2016 12:11:24 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ww8sUhVT; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=XAeuTk3MWIAbJ/0hW7/n1vNzBhimHZDbEcbk9z6Nq9JFnd fEtinUoVxBWDfqb6KbyKnQgzH3Gc3LcfbJ5+IuarMAeRk/anTOLEqBFZUq/6TXb1 ZvLEf7s5H6H95Kk7sCtp6VEA/wNqipTXY+IJaf9hEwneZQo3YT15cWrXtXnTY= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=zGDyXJkz+dL3zK14j/Aov1EhI2w=; b=ww8sUhVT9sQfAaPuLDTS hm8y46jtD6IqctyNao5vP6vnm6xMbz8sbd7Ovlz0bGOgpfSVuddajIycHwa5tRzC G+E9DGS4GgY9bKOEHxtxdTXSX+qkSodM6gEmp4+3+B+QLncKw9oghYWu1ZJg9qL3 GCnJ/BtCsEASSFoVQTzWQ5Q= Received: (qmail 59411 invoked by alias); 28 Jun 2016 02:11:13 -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 58982 invoked by uid 89); 28 Jun 2016 02:11:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=sk:downloa, pub X-HELO: mail-qk0-f169.google.com Received: from mail-qk0-f169.google.com (HELO mail-qk0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 28 Jun 2016 02:11:02 +0000 Received: by mail-qk0-f169.google.com with SMTP id a125so5090332qkc.2 for ; Mon, 27 Jun 2016 19:11:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=EIYRTcupg6WHF02SKyP9+l0sdPx9zctwtiTjrM8cvyc=; b=iJEC/0OASoG6bu/21yS9gnK9VMUE2K+jTVp1IcKlJQi7DocwXOuGrq+ZgJnhFlgL/B yAFWr0TG62uwV6RNHQTQz3D6XxekZqD5ZZHLRaZUNdo0tGyB/KwiQ+PahbSUsEnRv4w6 CFQY9PTfXWplZ8JSSyO6o9AnBPp7Syybc7hUani7WXHhyHpxDq0gt1dquHa0T7EbJLXE BT0NDaEbgxks3/HjGF7GMpwCvjBdArvcENEeDZ4j92n8DsJ4/75ys0mMRmSHblav/xMx ucQZA8mPWvcxddhW3yBehkwzTmanmfjXbxDQ7kS5eVKJzV0EJ61rRWXkJIbWBehoM8gQ cRow== X-Gm-Message-State: ALyK8tKDEwkMJBLrzPqlEuqw/mE6locou4+24YVGLfIVd5Q+TkeTPE5VDdMU2vB5PwnMB5mlfoYz3qIJAFJSYi0p X-Received: by 10.55.103.84 with SMTP id b81mr672258qkc.177.1467079859943; Mon, 27 Jun 2016 19:10:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.201.208 with HTTP; Mon, 27 Jun 2016 19:10:59 -0700 (PDT) From: Eric Gallager Date: Mon, 27 Jun 2016 22:10:59 -0400 Message-ID: Subject: [PATCH, contrib] download_prerequisites: check for existing symlinks before making new ones To: gcc-patches@gcc.gnu.org The last time I ran ./contrib/download_prerequisites, I already had previous symlinks set up from a previous run of the script, so `ln` followed the existing symlinks and created the new ones in the directories to which the symlinks pointed. This patch should fix that by removing the old symlinks before creating new ones. (For some reason the `-f` flag to `ln` that was already there wasn't enough for me.) Tested by running the script and ensuring that the new isl symlink pointed to the correct directory, and that there were no bad symlinks in the old isl directory. Could someone commit this trivial patch for me, or something like it? I don't have write access. Thanks, Eric Gallager contrib/download_prerequisites | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/download_prerequisites b/contrib/download_prerequisites index 917ee23..6c6e02f 100755 --- a/contrib/download_prerequisites +++ b/contrib/download_prerequisites @@ -36,14 +36,17 @@ MPC=mpc-1.0.3 wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPFR.tar.bz2 || exit 1 tar xjf $MPFR.tar.bz2 || exit 1 +if test -L mpfr; then unlink mpfr; fi ln -sf $MPFR mpfr || exit 1 wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$GMP.tar.bz2 || exit 1 tar xjf $GMP.tar.bz2 || exit 1 +if test -L gmp; then unlink gmp; fi ln -sf $GMP gmp || exit 1 wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$MPC.tar.gz || exit 1 tar xzf $MPC.tar.gz || exit 1 +if test -L mpc; then unlink mpc; fi ln -sf $MPC mpc || exit 1 # Necessary to build GCC with the Graphite loop optimizations. @@ -52,5 +55,6 @@ if [ "$GRAPHITE_LOOP_OPT" = "yes" ] ; then wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$ISL.tar.bz2 || exit 1 tar xjf $ISL.tar.bz2 || exit 1 + if test -L isl; then unlink isl; fi ln -sf $ISL isl || exit 1 fi