mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-25 19:43:19 -05: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:
@@ -292,13 +292,20 @@ create_virtual_base() {
|
|||||||
# Platform specific tweaks to work around some commands
|
# Platform specific tweaks to work around some commands
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
*MINGW*)
|
*MINGW*)
|
||||||
# Windows has its own (incompatible) sort and find
|
if test -x /usr/bin/sort
|
||||||
sort () {
|
then
|
||||||
/usr/bin/sort "$@"
|
# Windows has its own (incompatible) sort; override
|
||||||
}
|
sort () {
|
||||||
find () {
|
/usr/bin/sort "$@"
|
||||||
/usr/bin/find "$@"
|
}
|
||||||
}
|
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
|
# git sees Windows-style pwd
|
||||||
pwd () {
|
pwd () {
|
||||||
builtin pwd -W
|
builtin pwd -W
|
||||||
|
|||||||
@@ -1703,13 +1703,20 @@ fi
|
|||||||
uname_s=$(uname -s)
|
uname_s=$(uname -s)
|
||||||
case $uname_s in
|
case $uname_s in
|
||||||
*MINGW*)
|
*MINGW*)
|
||||||
# Windows has its own (incompatible) sort and find
|
if test -x /usr/bin/sort
|
||||||
sort () {
|
then
|
||||||
/usr/bin/sort "$@"
|
# Windows has its own (incompatible) sort; override
|
||||||
}
|
sort () {
|
||||||
find () {
|
/usr/bin/sort "$@"
|
||||||
/usr/bin/find "$@"
|
}
|
||||||
}
|
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
|
# git sees Windows-style pwd
|
||||||
pwd () {
|
pwd () {
|
||||||
builtin pwd -W
|
builtin pwd -W
|
||||||
|
|||||||
Reference in New Issue
Block a user