summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Johannes Sixt <johannes.sixt@telecom.at>2007-11-30 22:06:30 +0100
committerLibravatar Johannes Sixt <johannes.sixt@telecom.at>2008-06-26 08:45:09 +0200
commit87bddba9924045e39e988d9704714db90abd5619 (patch)
tree7c60c7d2dda31c3e495cb8aa271d57deeb1113f4
parentWindows: Implement asynchronous functions as threads. (diff)
downloadtgif-87bddba9924045e39e988d9704714db90abd5619.tar.xz
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>
-rwxr-xr-xgit-sh-setup.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index a44b1c74a3..9cceb21a82 100755
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -142,3 +142,16 @@ then
}
: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
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