summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Vyalkova <cyber+gentoo@sysrq.in>2022-06-30 18:08:08 +0500
committerSam James <sam@gentoo.org>2022-06-30 16:10:55 +0000
commit38401400615050684b8902f831abccee0bd551ed (patch)
tree8b421d03048750897783ca1bdb438b9a3cd32273
parentbootstrap-prefix.sh: fix LD_LIBRARY_PATH check typo (diff)
downloadprefix-38401400615050684b8902f831abccee0bd551ed.tar.gz
prefix-38401400615050684b8902f831abccee0bd551ed.tar.bz2
prefix-38401400615050684b8902f831abccee0bd551ed.zip
bootstrap-prefix.sh: fix coreutils check
It should be inverted. Also bootstrap coreutils only when needed. Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in> Closes: https://github.com/gentoo/prefix/pull/11 Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-xscripts/bootstrap-prefix.sh13
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index fbf7af3b68..5670f37bc2 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1542,20 +1542,19 @@ bootstrap_stage1() {
|| [[ $(bison --version 2>&1) == *GNU" "Bison") "2.[3-7]* ]] \
|| [[ $(bison --version 2>&1) == *GNU" "Bison") "[3-9]* ]] \
|| (bootstrap_bison) || return 1
- if [[ -x ${ROOT}/tmp/usr/bin/uniq ]]; then
+ if [[ ! -x ${ROOT}/tmp/usr/bin/uniq ]]; then
# If the system has a uniq, let's use it to test whether
# coreutils is new enough (and GNU).
if [[ $(uniq --version 2>&1) == *"(GNU coreutils) "[6789]* ]]; then
CP="cp"
+ else
+ (bootstrap_coreutils) || return 1
fi
fi
- # But for e.g. OpenBSD, it isn't going to be, so if our test failed,
- # bootstrap coreutils.
- if [[ -z ${CP} ]] ; then
- CP="${ROOT}/tmp/bin/cp"
- (bootstrap_coreutils) || return 1
- fi
+ # But for e.g. BSD, it isn't going to be, so if our test failed,
+ # use bootstrapped coreutils.
+ [[ -z ${CP} ]] && CP="${ROOT}/tmp/bin/cp"
[[ -x ${ROOT}/tmp/usr/bin/find ]] \
|| [[ $(find --version 2>&1) == *GNU* ]] \