Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: "Maciej Barć" <xgqt@g.o>
Cc: gentoo-dev@l.g.o, ml@g.o
Subject: Re: [gentoo-dev] [PATCH v3] eclass/dune.eclass: fix dune-install function
Date: Fri, 10 Dec 2021 07:53:56
Message-Id: ubl1oki9k@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH v3] eclass/dune.eclass: fix dune-install function by Ulrich Mueller
1 >>>>> On Fri, 10 Dec 2021, Ulrich Mueller wrote:
2
3 > I'd write something like this:
4
5 > local -a pkgs=("$@")
6 > [[ ${#pkgs[@]} -eq 0 ]] && pkgs=(${DUNE_PKG_NAME})
7
8 Looks like I'm not immune against missing quotes either. :/
9 The line should read:
10
11 [[ ${#pkgs[@]} -eq 0 ]] && pkgs=("${DUNE_PKG_NAME}")
12
13 > And the loop like this (note the double quotes to be whitespace-safe):
14
15 > for pkg in "${pkgs[@]}"; do
16 > ...
17 > done

Attachments

File name MIME type
signature.asc application/pgp-signature