Merge "Make jgit.sh work on windows when JGIT_CLASSPATH is set"

This commit is contained in:
Shawn Pearce 2015-01-27 00:51:18 -05:00 committed by Gerrit Code Review @ Eclipse.org
commit e463fdef15
1 changed files with 6 additions and 2 deletions

View File

@ -61,14 +61,18 @@ this_script=`which "$0" 2>/dev/null`
[ $? -gt 0 -a -f "$0" ] && this_script="$0"
cp=$this_script
platform="`uname`"
if [ -n "$JGIT_CLASSPATH" ]
then
cp="$cp:$JGIT_CLASSPATH"
cp_sep=:
# On Windows & MingW use ";" to separate classpath entries
[ "${platform#MINGW}" != "$platform" ] && cp_sep=";"
cp="$cp$cp_sep$JGIT_CLASSPATH"
fi
# Cleanup paths for Cygwin.
#
case "`uname`" in
case "$platform" in
CYGWIN*)
cp=`cygpath --windows --mixed --path "$cp"`
;;