From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iDnlOqezkmBunwAAgWs5BA (envelope-from ) for ; Wed, 05 May 2021 17:03:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kOVxNqezkmCwQwAAbx9fmQ (envelope-from ) for ; Wed, 05 May 2021 15:03:03 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 571E3A0B1 for ; Wed, 5 May 2021 17:03:03 +0200 (CEST) Received: from localhost ([::1]:36998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leJ3B-00024m-EX for larch@yhetil.org; Wed, 05 May 2021 11:03:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leJ1N-0001QZ-BW for guix-patches@gnu.org; Wed, 05 May 2021 11:01:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49264) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1leJ1K-0001Sx-KH for guix-patches@gnu.org; Wed, 05 May 2021 11:01:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1leJ1K-0004pI-Id for guix-patches@gnu.org; Wed, 05 May 2021 11:01:02 -0400 Subject: bug#48233: [PATCH 1/3] guix-install.sh: Please the shellcheck linter. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Wed, 05 May 2021 15:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48233 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 48233-done@debbugs.gnu.org Mail-Followup-To: 48233@debbugs.gnu.org, maxim.cournoyer@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 48233-done@debbugs.gnu.org id=D48233.162022685118517 (code D ref 48233); Wed, 05 May 2021 15:01:02 +0000 Received: (at 48233-done) by debbugs.gnu.org; 5 May 2021 15:00:51 +0000 Received: from localhost ([127.0.0.1]:60806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1leJ19-0004ob-Dq for submit@debbugs.gnu.org; Wed, 05 May 2021 11:00:51 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:41478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1leJ17-0004oV-Mf for 48233-done@debbugs.gnu.org; Wed, 05 May 2021 11:00:50 -0400 Received: by mail-qk1-f177.google.com with SMTP id l129so1760367qke.8 for <48233-done@debbugs.gnu.org>; Wed, 05 May 2021 08:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=wcMeEzdIlZ59Jt3AJ6y3v2MXLsSinQs+8QcJfgJmBUs=; b=Q96OqS7ZodCYdkr5kyxilPRA+6qTvrES6sdGcGnOZiatjcFzv1XNSCEvTc1F5E/HA8 k9vCjEab0mKUu+ibn+i4Ovk5wydX99vGurr0PWPCscTd0G7YSisrvh/q6ExlBtmyWwXy AWeIlDV2uHcllacbW4CSKs6YaJNv7Coq8hrfmZ+KYcj+R0ihiePBznw/k139bwa5SWbr LPbCbpGNb2nYikEYWa3UedFXkhjRfe/o381svEcNqrm6gWICwtQGavpTPjbrSeDYk73q CqeRKH0/Vtx7Maesqfyp8ZflxWkp8fNUWdQsbrJ1mIFJH+RW6WFzo8CcEyMLSYy694tc Jy9g== 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:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=wcMeEzdIlZ59Jt3AJ6y3v2MXLsSinQs+8QcJfgJmBUs=; b=US7094lE3ZrL8mJaKFg1Iw/qSALllRnt3Y73yGYw+k7joGW4BgugfSqTrvha39Fkny zNZgsY2H8bA4SJFm4shbMWLQ7XNd1nRJbpHHyX18NaTJqHIQkzSUsXd4Sli01asV8IbH 263ZkoUuUKJJFCtiECmOyaXcFh+Z7Yp3oKwS2lSRur5hLGWy/8evZxBp7hkjTk263mEB WKDiedEKJb7e6tDLSBFadRF+ngK9l/vcm5jXjdnKPGC7q00i91MvaZt+7hbws+LQK3Nl FtxbG/5JYPbmMlyeE2jzLPqar85WlzYAzA9kD36De7Ude4zmpqXy1bAQHMdFM977J5zY gh6Q== X-Gm-Message-State: AOAM531HvJSKzOVtK4vagR3zv7h9yTSbh9Sac3fPU+5c7mj826+iZ47b 9zWGZi64qKnb4W/3MkzkGTtrznkHbhdSiw8O X-Google-Smtp-Source: ABdhPJwu9tZjDzZS1/cbaGFOvSblCRacrPmri//2QbBkr6EWt/FEYiXwhA2pi3eztkLRn7bmwZTdKw== X-Received: by 2002:ae9:ef0b:: with SMTP id d11mr16886550qkg.431.1620226843738; Wed, 05 May 2021 08:00:43 -0700 (PDT) Received: from hurd (mtl.savoirfairelinux.net. [208.88.110.46]) by smtp.gmail.com with ESMTPSA id d84sm2814071qke.131.2021.05.05.08.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 08:00:43 -0700 (PDT) From: Maxim Cournoyer References: <87czu5lspv.fsf@gmail.com> <20210505043202.24636-1-maxim.cournoyer@gmail.com> <2F845AA8-1309-4834-92FE-BBFFB0197093@lepiller.eu> Date: Wed, 05 May 2021 11:00:42 -0400 In-Reply-To: <2F845AA8-1309-4834-92FE-BBFFB0197093@lepiller.eu> (Julien Lepiller's message of "Wed, 05 May 2021 06:50:09 -0400") Message-ID: <87o8dpjkdh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620226983; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=wcMeEzdIlZ59Jt3AJ6y3v2MXLsSinQs+8QcJfgJmBUs=; b=K+h2QyP9EMppsus+9y+jiIYVSEZjuc/+8FaYmkJ3SIruj4NBjKuznkadJx0QxqZ6qmrADD Ed2dTp0CnXMSdbc5a0lL9EGC66sXh42eQvzdlUWkVRKPvGLdVDrgBOHxIa2tiG5SCl/LNc H35teWFFCUIkyWTa2pU/Qr0Ujyk0VIZIL+H7ruDLoBhO2my0RoCXsz02CcAwaXAHdGGS53 Jf/MvRWGmvcEEKdCyHGYooqEr2RhclPvrxx7tXGxg2mnwgP9jaB97MEU+UfgR9iVaaGX8v +2lFnfOa8lMCSC9ePYMbWzhYsSCSEQdSayyVgUYmTARVafIH7UQmuRQP6XTeig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620226983; a=rsa-sha256; cv=none; b=AfVZ5cjYytxBlTK1x5NKiyFhiRMxQaKmWOAqAOar0pghCEMEooAXSrEWDdMhc93NMwu6FT W9nxJnPhLMRttc4U42Gs4Kr/kiKtiXyp1fRjGNkeOsPIJDbMmWPgUY5pfIxOjlGxoUZd7w pNFmJnNPuNiFQWKPXatcz2U3caiKTscGp2vjS6bX/MZvtZAIk2FiuilLZN7QBYWhtspdPq lGy2vts6z5cSQKHHQKWIY3wIZjUTdqcPxYK09+01yk2/vUcH3zME9de4JbrYgPtNHwYcdj Xk0uqR6x58zaIk0UQyJU04Pxrw/Le//dfkPBB+rnGox0faUIdSjzgiwMi8/kLQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=Q96OqS7Z; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.37 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=Q96OqS7Z; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 571E3A0B1 X-Spam-Score: -1.37 X-Migadu-Scanner: scn0.migadu.com X-TUID: zyJ+ga8sPLWv Hi Julien, Julien Lepiller writes: > Le 5 mai 2021 00:32:00 GMT-04:00, Maxim Cournoyer a =C3=A9crit : >> >> wget --help | grep -q '\--show-progress' && \ >> _PROGRESS_OPT=3D"-q --show-progress" || _PROGRESS_OPT=3D"" >>- wget $_PROGRESS_OPT -P "$dl_path" "${url}/${bin_ver}.tar.xz" >>"${url}/${bin_ver}.tar.xz.sig" >> >>- if [[ "$?" -eq 0 ]]; then >>- _msg "${PAS}download completed." >>+ if wget "$_PROGRESS_OPT" -P "$dl_path" \ >>+ "${url}/${bin_ver}.tar.xz" "${url}/${bin_ver}.tar.xz.sig"; > > "$_PROGRESS_OPT" gets expanded to a single "-q --show-progress", which I = doubt exists in wget :). The previous version didn't have quotes. Good catch! I failed to see that in my testing due to using the GUIX_RELEASE_FILE_NAME trick, which shortcuts that procedure. I've fixed it with an array: --8<---------------cut here---------------start------------->8--- 1 file changed, 4 insertions(+), 3 deletions(-) etc/guix-install.sh | 7 ++++--- modified etc/guix-install.sh @@ -266,15 +266,16 @@ guix_get_bin() local url=3D"$1" local bin_ver=3D"$2" local dl_path=3D"$3" + local wget_args=3D() _debug "--- [ ${FUNCNAME[0]} ] ---" _msg "${INF}Downloading Guix release archive" - wget --help | grep -q '\--show-progress' && \ - _PROGRESS_OPT=3D"-q --show-progress" || _PROGRESS_OPT=3D"" + wget --help | grep -q '\--show-progress' \ + && wget_args=3D("-q" "--show-progress") - if wget "$_PROGRESS_OPT" -P "$dl_path" \ + if wget "${wget_args[@]}" -P "$dl_path" \ "${url}/${bin_ver}.tar.xz" "${url}/${bin_ver}.tar.xz.sig"; then _msg "${PAS}download completed." else --8<---------------cut here---------------end--------------->8--- And in another VM (RHEL8) with up-to-date certs to be able to fetch from the alpha.gnu.org :-). The install went fine. Pushed, thank you! Maxim