GNU bug report logs - #40601
guix-install.sh: port to other distros & init systems

Previous Next

Package: guix-patches;

Reported by: Vincent Legoll <vincent.legoll <at> gmail.com>

Date: Mon, 13 Apr 2020 16:05:01 UTC

Severity: normal

Tags: patch

Done: Vincent Legoll <vincent.legoll <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Vincent Legoll <vincent.legoll <at> gmail.com>
To: 40601 <at> debbugs.gnu.org
Cc: Vincent Legoll <vincent.legoll <at> gmail.com>
Subject: [bug#40601] [PATCH 24/28] Remove some "[[" bashisms
Date: Sun, 17 May 2020 19:17:21 +0200
---
 etc/guix-install.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 431790709a..cd33bf55bf 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -216,7 +216,7 @@ guix_get_bin_list()
 
     default_ver="guix-binary-${latest_ver}.${ARCH_OS}"
 
-    if [[ "${#bin_ver_ls}" -ne "0" ]]; then
+    if [ "${#bin_ver_ls}" -ne 0 ]; then
         _msg "${PAS}Release for your system: ${default_ver}"
     else
         _err "${ERR}Could not obtain list of Guix releases."
@@ -241,7 +241,7 @@ guix_get_bin()
         _PROGRESS_OPT="-q --show-progress" || _PROGRESS_OPT=""
     wget $_PROGRESS_OPT -P "${dl_path}" "${url}/${bin_ver}.tar.xz" "${url}/${bin_ver}.tar.xz.sig"
 
-    if [[ "$?" -eq 0 ]]; then
+    if [ "$?" -eq 0 ]; then
        _msg "${PAS}download completed."
     else
         _err "${ERR}could not download ${url}/${bin_ver}.tar.xz."
@@ -250,7 +250,7 @@ guix_get_bin()
 
     pushd "${dl_path}" >/dev/null
     gpg --verify "${bin_ver}.tar.xz.sig" >/dev/null 2>&1
-    if [[ "$?" -eq 0 ]]; then
+    if [ "$?" -eq 0 ]; then
         _msg "${PAS}Signature is valid."
         popd >/dev/null
     else
@@ -275,7 +275,7 @@ sys_create_store()
     tar x -f "${pkg}" "${TAROPTS[@]}" &&
     _msg "${PAS}unpacked archive"
 
-    if [[ -e "/var/guix" || -e "/gnu" ]]; then
+    if [ -e "/var/guix" ] || [ -e "/gnu" ]; then
         _err "${ERR}A previous Guix installation was found.  Refusing to overwrite."
         exit 1
     else
-- 
2.26.2





This bug report was last modified 345 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.