patch build-gnu.sh for NixOS

This commit is contained in:
Dorian Péron 2024-08-02 13:23:08 +02:00
parent 3f53522241
commit 1e686ec25c

View file

@ -345,3 +345,8 @@ sed -i "s/color_code='0;31;42'/color_code='31;42'/" tests/ls/quote-align.sh
# Slightly different error message
sed -i 's/not supported/unexpected argument/' tests/mv/mv-exchange.sh
# Most tests check that `/usr/bin/tr` is working correctly before running.
# However in NixOS/Nix-based distros, the tr coreutil is located somewhere in
# /nix/store/xxxxxxxxxxxx...xxxx/bin/tr
# We just replace the references to `/usr/bin/tr` with the result of `$(which tr)`
sed -i 's/\/usr\/bin\/tr/$(which tr)/' tests/init.sh