diff options
author | Christian Halstrick <christian.halstrick@sap.com> | 2014-12-01 14:13:09 +0100 |
---|---|---|
committer | Christian Halstrick <christian.halstrick@sap.com> | 2014-12-01 14:54:17 +0100 |
commit | 145b1bf0fbe2a63e1ac3fb0c9b527968eeec1f39 (patch) | |
tree | 2278def4a9b4ad3dcf317c2b7b57d2e550877c26 /org.eclipse.jgit.pgm/jgit.sh | |
parent | c9a5fdb3cd92d5774aa7041b9fc9fc579dc26edc (diff) | |
download | jgit-145b1bf0fbe2a63e1ac3fb0c9b527968eeec1f39.tar.gz jgit-145b1bf0fbe2a63e1ac3fb0c9b527968eeec1f39.zip |
Make jgit.sh work on windows when JGIT_CLASSPATH is set
jgit.sh was concatenating classpath entries with ":". On Windows systems
using "Git for Windows" this caused problems when JGIT_CLASSPATH was set.
Find out whether we are running on a platform which name starts with
"MINGW" ("Git for Windows" sets this) and use ";" as classpath
separator in this case.
Change-Id: I7e8fc2bee6513f587612accfc456a83d6277ef4a
Diffstat (limited to 'org.eclipse.jgit.pgm/jgit.sh')
-rw-r--r-- | org.eclipse.jgit.pgm/jgit.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/jgit.sh b/org.eclipse.jgit.pgm/jgit.sh index 6b9ce40e9b..826714751c 100644 --- a/org.eclipse.jgit.pgm/jgit.sh +++ b/org.eclipse.jgit.pgm/jgit.sh @@ -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"` ;; |