mirror of
https://github.com/git/git.git
synced 2026-01-19 15:09:01 +00:00
tests: only override sort & find if there are usable ones in /usr/bin/
The idea is to allow running the test suite on MinGit with BusyBox installed in /mingw64/bin/sh.exe. In that case, we will want to exclude sort & find (and other Unix utilities) from being bundled. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Jameson Miller
parent
120b33e9e0
commit
c20716eb8e
@@ -332,13 +332,20 @@ create_virtual_base() {
|
||||
# Platform specific tweaks to work around some commands
|
||||
case $(uname -s) in
|
||||
*MINGW*)
|
||||
# Windows has its own (incompatible) sort and find
|
||||
sort () {
|
||||
/usr/bin/sort "$@"
|
||||
}
|
||||
find () {
|
||||
/usr/bin/find "$@"
|
||||
}
|
||||
if test -x /usr/bin/sort
|
||||
then
|
||||
# Windows has its own (incompatible) sort; override
|
||||
sort () {
|
||||
/usr/bin/sort "$@"
|
||||
}
|
||||
fi
|
||||
if test -x /usr/bin/find
|
||||
then
|
||||
# Windows has its own (incompatible) find; override
|
||||
find () {
|
||||
/usr/bin/find "$@"
|
||||
}
|
||||
fi
|
||||
# git sees Windows-style pwd
|
||||
pwd () {
|
||||
builtin pwd -W
|
||||
|
||||
@@ -1038,13 +1038,20 @@ yes () {
|
||||
uname_s=$(uname -s)
|
||||
case $uname_s in
|
||||
*MINGW*)
|
||||
# Windows has its own (incompatible) sort and find
|
||||
sort () {
|
||||
/usr/bin/sort "$@"
|
||||
}
|
||||
find () {
|
||||
/usr/bin/find "$@"
|
||||
}
|
||||
if test -x /usr/bin/sort
|
||||
then
|
||||
# Windows has its own (incompatible) sort; override
|
||||
sort () {
|
||||
/usr/bin/sort "$@"
|
||||
}
|
||||
fi
|
||||
if test -x /usr/bin/find
|
||||
then
|
||||
# Windows has its own (incompatible) find; override
|
||||
find () {
|
||||
/usr/bin/find "$@"
|
||||
}
|
||||
fi
|
||||
# git sees Windows-style pwd
|
||||
pwd () {
|
||||
builtin pwd -W
|
||||
|
||||
Reference in New Issue
Block a user