guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: guix-install.sh: Treat REQUIRE as the array it is.


From: guix-commits
Subject: 01/02: guix-install.sh: Treat REQUIRE as the array it is.
Date: Mon, 8 Jul 2019 11:47:52 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit 6c77d79a4994124150071b36bfbb74c18a4651b3
Author: Tobias Geerinckx-Rice <address@hidden>
Date:   Mon Jul 8 17:32:53 2019 +0200

    guix-install.sh: Treat REQUIRE as the array it is.
    
    Don't flatten it into a string only to split it again later.
    
    * etc/guix-install.sh (chk_require): Iterate over array elements, not
    string tokens.
    (main): Pass $REQUIRE as an array of arguments.
---
 etc/guix-install.sh | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index aa95cb4..d3f80d1 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -3,6 +3,7 @@
 # Copyright © 2017 sharlatan <address@hidden>
 # Copyright © 2018 Ricardo Wurmus <address@hidden>
 # Copyright © 2018 Efraim Flashner <address@hidden>
+# Copyright © 2019 Tobias Geerinckx-Rice <address@hidden>
 #
 # This file is part of GNU Guix.
 #
@@ -85,14 +86,11 @@ _debug()
 
 chk_require()
 { # Check that every required command is available.
-    declare -a cmds
     declare -a warn
 
-    cmds=(${1})
-
     _debug "--- [ $FUNCNAME ] ---"
 
-    for c in ${cmds[@]}; do
+    for c in "$@"; do
         command -v "$c" &>/dev/null || warn+=("$c")
     done
 
@@ -415,7 +413,7 @@ main()
     _msg "Starting installation ($(date))"
 
     chk_term
-    chk_require "${REQUIRE[*]}"
+    chk_require "${REQUIRE[@]}"
     chk_init_sys
     chk_sys_arch
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]