From patchwork Sun May 17 17:17:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Legoll X-Patchwork-Id: 22174 X-Patchwork-Delegate: mail@cbaines.net Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0F6B027BBE1; Sun, 17 May 2020 18:20:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 7079E27BBE3 for ; Sun, 17 May 2020 18:20:20 +0100 (BST) Received: from localhost ([::1]:45600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaMxY-0001wN-16 for patchwork@mira.cbaines.net; Sun, 17 May 2020 13:20:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaMwS-0008P7-63 for guix-patches@gnu.org; Sun, 17 May 2020 13:19:12 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaMwR-0004Nf-QH for guix-patches@gnu.org; Sun, 17 May 2020 13:19:11 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jaMwR-0007BO-Mb for guix-patches@gnu.org; Sun, 17 May 2020 13:19:11 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40601] [PATCH 22/28] Remove local bashisms Resent-From: Vincent Legoll Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 May 2020 17:19:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40601 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40601@debbugs.gnu.org Cc: Vincent Legoll Received: via spool by 40601-submit@debbugs.gnu.org id=B40601.158973592027425 (code B ref 40601); Sun, 17 May 2020 17:19:11 +0000 Received: (at 40601) by debbugs.gnu.org; 17 May 2020 17:18:40 +0000 Received: from localhost ([127.0.0.1]:44610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaMvv-00078A-IX for submit@debbugs.gnu.org; Sun, 17 May 2020 13:18:39 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:52218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaMvP-00073G-3l for 40601@debbugs.gnu.org; Sun, 17 May 2020 13:18:07 -0400 Received: by mail-wm1-f43.google.com with SMTP id f134so6997815wmf.1 for <40601@debbugs.gnu.org>; Sun, 17 May 2020 10:18:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+SEZi/2QEkG9kD0HWIabf4tSJMC684gTnEP6nOKmweI=; b=mSviWSh+cdI5PENu7P97JnQqj6Thd6XNMEs7wc0+k0Wf4IJQisDS7HILdcuj2LTY31 UhaygSEXdhf+klYXVF/E6mP6c0uQ9bmSLqV9FepgFPfjuEnps48vYfz+ov99++jcy8+e i45JVcKuSVPlRR/vmFuVxBUNwhDoGwVDRoPQcoQnO6ARQvfK4ZeSpx77UHaYv1Za8Cdr /bMMhtVw8yPHAhqxjYWRL2bSpPYb0aBa8bILhfHCsYnS365FLhwkslPVDNcKTQFzRP/s 6xu4W21X2N/jximmFaTkazlo2CipLCAcmynHNRe13zVvqUVXxhT2U1r6VmpJKcMsL13s TFQQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=+SEZi/2QEkG9kD0HWIabf4tSJMC684gTnEP6nOKmweI=; b=MCF8eODhK40hJYgBY+54p6R5qA+Ev7q0/IHIh1sCSJTnOoGIyRGFop66isysaeYtxZ SyC+l/TfNQGYfKdr18C8zSY+9/VHtaSoLyVcfeXcorSSoNBJxkykHKgYZ9ErVTyodA0C oDm399Q5tui9aPELDHUPw+s3w2AAFMTczQqFvaEv1KIWbHAvqqWbz+8RSBIETTsakzWD KzpST/kT7chS2oL+XXZjNPWo4OwaIBaVwieWr+xIoOHS5gyFuQHva95R69KUq3rAeaiE 0zwxeKjO7vMUDNuK8HnVz6CnzwSOFZWukHXyx+zMT+nPu3YFd/zwbmXS86Y5YBTXt3gG DCkA== X-Gm-Message-State: AOAM531ygy/6cuZnAck5OnG3ELA1nKfZCjkAwqLQ9Dct4Igd03LVdfo/ 9dB0KkVmPLLDodJHHKeQUMFyulLx X-Google-Smtp-Source: ABdhPJwDfvYmrfToYGT22EK6QDAIlk17W+dcBQzdkXm3YJAWGhkTgi+VgWXvozWTZjmgUXmQYgF2OA== X-Received: by 2002:a1c:29c2:: with SMTP id p185mr14206208wmp.7.1589735881338; Sun, 17 May 2020 10:18:01 -0700 (PDT) Received: from localhost.localdomain (se167-1-82-242-148-1.fbx.proxad.net. [82.242.148.1]) by smtp.gmail.com with ESMTPSA id v126sm13305048wma.9.2020.05.17.10.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 10:18:00 -0700 (PDT) From: Vincent Legoll Date: Sun, 17 May 2020 19:17:19 +0200 Message-Id: <20200517171725.732-22-vincent.legoll@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200517171725.732-1-vincent.legoll@gmail.com> References: <20200517171725.732-1-vincent.legoll@gmail.com> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- etc/guix-install.sh | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 078081c08a..c7144288c9 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -89,7 +89,6 @@ _debug() chk_require() { # Check that every required command is available. declare -a warn - local c _debug "--- [ $FUNCNAME ] ---" @@ -163,24 +162,22 @@ chk_init_sys() chk_sys_arch() { # Check for operating system and architecture type. - local os - local arch os="$(uname -s)" arch="$(uname -m)" case "$arch" in i386 | i486 | i686 | i786 | x86) - local arch=i686 + arch=i686 ;; x86_64 | x86-64 | x64 | amd64) - local arch=x86_64 + arch=x86_64 ;; aarch64) - local arch=aarch64 + arch=aarch64 ;; armv7l) - local arch=armhf + arch=armhf ;; *) _err "${ERR}Unsupported CPU type: ${arch}" @@ -189,7 +186,7 @@ chk_sys_arch() case "$os" in Linux | linux) - local os=linux + os=linux ;; *) _err "${ERR}Your operation system (${os}) is not supported." @@ -204,10 +201,7 @@ chk_sys_arch() guix_get_bin_list() { # Scan GNU archive and save list of binaries - local gnu_url="$1" - local -a bin_ver_ls - local latest_ver - local default_ver + gnu_url="$1" _debug "--- [ $FUNCNAME ] ---" @@ -235,9 +229,9 @@ guix_get_bin_list() guix_get_bin() { # Download and verify binary package. - local url="$1" - local bin_ver="$2" - local dl_path="$3" + url="$1" + bin_ver="$2" + dl_path="$3" _debug "--- [ $FUNCNAME ] ---" @@ -267,8 +261,8 @@ guix_get_bin() sys_create_store() { # Unpack and install /gnu/store and /var/guix - local pkg="$1" - local tmp_path="$2" + pkg="$1" + tmp_path="$2" _debug "--- [ $FUNCNAME ] ---" @@ -426,10 +420,6 @@ sys_enable_guix_daemon() sys_make_guix_available() { # add guix into PATH - local info_path - local local_bin - local var_guix - _debug "--- [ $FUNCNAME ] ---" info_path="/usr/local/share/info" @@ -559,7 +549,6 @@ handle_args() main() { - local tmp_path handle_args "$@" [ "${_INTERACTIVE}" -eq 1 ] && welcome