Fix DirCache's skip over null byte padding when reading a DIRC file
[egit/imyousuf.git] / jgit.sh
blob6b9b22498af396620e11ff3b4191962c9df473b0
1 #!/bin/sh
3 if [ "@@use_self@@" = "1" ]
4 then
5 this_script=`which "$0" 2>/dev/null`
6 [ $? -gt 0 -a -f "$0" ] && this_script="$0"
7 cp=$this_script
8 else
9 jgit_home=`dirname $0`
10 cp="$jgit_home/org.spearce.jgit/bin"
11 cp="$cp:$jgit_home/org.spearce.jgit/lib/jsch-0.1.37.jar"
12 cp="$cp:$jgit_home/org.spearce.jgit.pgm/bin"
13 cp="$cp:$jgit_home/org.spearce.jgit.pgm/lib/args4j-2.0.9.jar"
14 unset jgit_home
15 java_args=
18 if [ -n "$JGIT_CLASSPATH" ]
19 then
20 cp="$cp:$JGIT_CLASSPATH"
23 # Cleanup paths for Cygwin.
25 case "`uname`" in
26 CYGWIN*)
27 cp=`cygpath --windows --mixed --path "$cp"`
29 Darwin)
30 if test -e /System/Library/Frameworks/JavaVM.framework
31 then
32 java_args='
33 -Dcom.apple.mrj.application.apple.menu.about.name=JGit
34 -Dcom.apple.mrj.application.growbox.intrudes=false
35 -Dapple.laf.useScreenMenuBar=true
36 -Xdock:name=JGit
40 esac
42 CLASSPATH="$cp"
43 export CLASSPATH
45 java=java
46 if test -n "$JAVA_HOME"
47 then
48 java="$JAVA_HOME/bin/java"
51 exec "$java" $java_args org.spearce.jgit.pgm.Main "$@"
52 exit 1