Windows: Work around incompatible sort and find.

If the PATH lists the Windows system directories before the MSYS
directories, Windows's own incompatible sort and find commands would be
picked up. We implement these commands as functions and call the real
tools by absolute path.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
Johannes Sixt 2007-11-30 22:06:30 +01:00
Родитель 618ebe9ff9
Коммит 87bddba992
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -142,3 +142,16 @@ then
} }
: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"} : ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
fi fi
# Fix some commands on Windows
case $(uname -s) in
*MINGW*)
# Windows has its own (incompatible) sort and find
sort () {
/usr/bin/sort "$@"
}
find () {
/usr/bin/find "$@"
}
;;
esac