Gentoo Archives: gentoo-alt

From: Etienne Buira <etienne.buira.lists@××××.fr>
To: gentoo-alt@l.g.o
Subject: [gentoo-alt] [PATCH v2 1/3] scripts/bootstrap-prefix: bugfix: use given EPREFIX
Date: Sat, 04 Dec 2021 07:53:30
Message-Id: 597f15c83b998875a90bb0ee14b491246c440146.1638604209.git.etienne.buira.lists@free.fr
1 Using $1 should not be reserved to uninteractive
2
3 v2:
4 - leave some comment
5 - not moved down, because the following environment sanitiser unsets
6 $ROOT
7 - shortened $subject
8
9 Thanks grobian for review
10 ---
11 scripts/bootstrap-prefix.sh | 5 ++---
12 1 file changed, 2 insertions(+), 3 deletions(-)
13
14 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
15 index 1c6c42dad6..a2b1db7235 100755
16 --- a/scripts/bootstrap-prefix.sh
17 +++ b/scripts/bootstrap-prefix.sh
18 @@ -2322,9 +2322,8 @@ EOF
19 echo
20 echo "It seems to me you are '${USER:-$(whoami 2> /dev/null)}' (${UID}), that looks cool to me."
21
22 - # Expect noninteractive users to know what they do:
23 - # Take EPREFIX from argv1 (=ROOT), not from env var.
24 - [[ ${TODO} == 'noninteractive' ]] && EPREFIX=${ROOT}
25 + # In case $ROOT were specified as $1, use it
26 + [[ -z "${EPREFIX}" ]] && EPREFIX="${ROOT}"
27
28 echo
29 echo "I'm going to check for some variables in your environment now:"
30 --
31 2.32.0

Replies