From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CDMfEcKdXGBpKAAAWB0awg (envelope-from ) for ; Thu, 25 Mar 2021 10:27:14 -0400 Received: by simark.ca (Postfix, from userid 112) id 370721EF7C; Thu, 25 Mar 2021 10:27:14 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 69E1B1E789 for ; Thu, 25 Mar 2021 10:27:13 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 186893846074; Thu, 25 Mar 2021 14:27:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 186893846074 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1616682433; bh=S2hnM2XGIIdO9A/T2GXePDN+70S8Muh/Yh4WLmCMw1A=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=VtC2bcgExFLwo4gIRfJH6em2JJdLpDJT57dyYW73/RUdg+nSMdUX5Vw3/8w4pxtQR PR55Q78whN8NXBcppIAG9062xERXTrSV3uE9kDC8yLGNfgkLG1pPcYli+LZJx4z6Ac w8w7cWQTctMzUWPaLGsPYoG1LBq/qH4KwYoE05B8= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 571B4385800A for ; Thu, 25 Mar 2021 14:27:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 571B4385800A Received: from gwenhwyvar (unknown [IPv6:2a02:390:9086:0:f958:62d1:e85b:d3a8]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 4C6E98182E; Thu, 25 Mar 2021 14:27:08 +0000 (UTC) Date: Thu, 25 Mar 2021 14:27:03 +0000 To: Andreas Schwab Subject: Re: [PATCH] [PR gdb/27614] gdb-add-index fails on symlinks. Message-ID: <20210325142703.GA9731@gwenhwyvar> References: <20210325004358.31291-1-lsix@lancelotsix.com> <87eeg3k30x.fsf@igel.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87eeg3k30x.fsf@igel.home> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Thu, 25 Mar 2021 14:27:08 +0000 (UTC) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: Lancelot SIX via Gdb-patches Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Thu, Mar 25, 2021 at 10:15:26AM +0100, Andreas Schwab wrote: > On Mär 25 2021, Lancelot SIX via Gdb-patches wrote: > > > +if test -L "$1"; then > > + # This script will most likely fail if the argument is a symlink to a > > + # program. In order to avoid that, try to follow the symlink. However, > > + # readlink is not a standard POSIX tool so we have to check if it is > > + # available. > > + if command -v readlink &>/dev/null; then > > &> isn't standard shell. Thanks for spotting it. I’ll change it to '2>&1 >/dev/null'. Lancelot. > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different."