3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

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.
This commit is contained in:
Tobias Geerinckx-Rice 2019-07-08 17:32:53 +02:00
parent b6dc08393e
commit 6c77d79a49
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -3,6 +3,7 @@
# Copyright © 2017 sharlatan <sharlatanus@gmail.com>
# Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
# Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
# Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
#
# 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