mirror of
https://github.com/aphrody-labs/uutils-coreutils.git
synced 2026-10-14 05:09:26 +00:00
26 lines
990 B
Bash
Executable File
26 lines
990 B
Bash
Executable File
#!/bin/bash -e
|
|
ver="9.12"
|
|
repo=https://github.com/coreutils/coreutils
|
|
curl -L "${repo}/releases/download/v${ver}/coreutils-${ver}.tar.xz" | tar --strip-components=1 -xJf -
|
|
|
|
# TODO stop backporting tests from master at GNU coreutils > $ver
|
|
backport=(
|
|
# https://github.com/coreutils/coreutils/issues/355
|
|
env/env.sh
|
|
env/printenv.sh
|
|
)
|
|
for f in "${backport[@]}"
|
|
do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f
|
|
done
|
|
|
|
# A test that does not exist in $ver at all is absent from its test list, so
|
|
# `make check` would silently never run it. Register those in both the automake
|
|
# input and the generated Makefile.in: configure derives Makefile from the
|
|
# latter, and build-gnu.sh deliberately keeps automake from re-running.
|
|
for f in "${backport[@]}"; do
|
|
grep -qF "tests/$f" tests/local.mk ||
|
|
sed -i "s|^all_tests =.*|&\n tests/$f\t\t\t\t\\\\|" tests/local.mk
|
|
grep -qF "tests/$f" Makefile.in ||
|
|
sed -i "s|^all_tests =.*|&\n tests/$f\t\t\t\t\\\\|" Makefile.in
|
|
done
|