1*dad52baaSShawn O. Pearce#!/bin/sh 2*dad52baaSShawn O. Pearce# Copyright (C) 2008-2009, Google Inc. 3*dad52baaSShawn O. Pearce# Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> 4*dad52baaSShawn O. Pearce# and other copyright owners as documented in the project's IP log. 5*dad52baaSShawn O. Pearce# 6*dad52baaSShawn O. Pearce# This program and the accompanying materials are made available 7*dad52baaSShawn O. Pearce# under the terms of the Eclipse Distribution License v1.0 which 8*dad52baaSShawn O. Pearce# accompanies this distribution, is reproduced below, and is 9*dad52baaSShawn O. Pearce# available at http://www.eclipse.org/org/documents/edl-v10.php 10*dad52baaSShawn O. Pearce# 11*dad52baaSShawn O. Pearce# All rights reserved. 12*dad52baaSShawn O. Pearce# 13*dad52baaSShawn O. Pearce# Redistribution and use in source and binary forms, with or 14*dad52baaSShawn O. Pearce# without modification, are permitted provided that the following 15*dad52baaSShawn O. Pearce# conditions are met: 16*dad52baaSShawn O. Pearce# 17*dad52baaSShawn O. Pearce# - Redistributions of source code must retain the above copyright 18*dad52baaSShawn O. Pearce# notice, this list of conditions and the following disclaimer. 19*dad52baaSShawn O. Pearce# 20*dad52baaSShawn O. Pearce# - Redistributions in binary form must reproduce the above 21*dad52baaSShawn O. Pearce# copyright notice, this list of conditions and the following 22*dad52baaSShawn O. Pearce# disclaimer in the documentation and/or other materials provided 23*dad52baaSShawn O. Pearce# with the distribution. 24*dad52baaSShawn O. Pearce# 25*dad52baaSShawn O. Pearce# - Neither the name of the Eclipse Foundation, Inc. nor the 26*dad52baaSShawn O. Pearce# names of its contributors may be used to endorse or promote 27*dad52baaSShawn O. Pearce# products derived from this software without specific prior 28*dad52baaSShawn O. Pearce# written permission. 29*dad52baaSShawn O. Pearce# 30*dad52baaSShawn O. Pearce# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 31*dad52baaSShawn O. Pearce# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 32*dad52baaSShawn O. Pearce# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 33*dad52baaSShawn O. Pearce# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 34*dad52baaSShawn O. Pearce# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 35*dad52baaSShawn O. Pearce# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 36*dad52baaSShawn O. Pearce# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 37*dad52baaSShawn O. Pearce# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 38*dad52baaSShawn O. Pearce# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 39*dad52baaSShawn O. Pearce# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 40*dad52baaSShawn O. Pearce# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 41*dad52baaSShawn O. Pearce# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 42*dad52baaSShawn O. Pearce# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 43*dad52baaSShawn O. Pearce 44*dad52baaSShawn O. Pearce 45*dad52baaSShawn O. Pearcethis_script=`which "$0" 2>/dev/null` 46*dad52baaSShawn O. Pearce[ $? -gt 0 -a -f "$0" ] && this_script="$0" 47*dad52baaSShawn O. Pearcecp=$this_script 48*dad52baaSShawn O. Pearce 49*dad52baaSShawn O. Pearceif [ -n "$JGIT_CLASSPATH" ] 50*dad52baaSShawn O. Pearcethen 51*dad52baaSShawn O. Pearce cp="$cp:$JGIT_CLASSPATH" 52*dad52baaSShawn O. Pearcefi 53*dad52baaSShawn O. Pearce 54*dad52baaSShawn O. Pearce# Cleanup paths for Cygwin. 55*dad52baaSShawn O. Pearce# 56*dad52baaSShawn O. Pearcecase "`uname`" in 57*dad52baaSShawn O. PearceCYGWIN*) 58*dad52baaSShawn O. Pearce cp=`cygpath --windows --mixed --path "$cp"` 59*dad52baaSShawn O. Pearce ;; 60*dad52baaSShawn O. PearceDarwin) 61*dad52baaSShawn O. Pearce if test -e /System/Library/Frameworks/JavaVM.framework 62*dad52baaSShawn O. Pearce then 63*dad52baaSShawn O. Pearce java_args=' 64*dad52baaSShawn O. Pearce -Dcom.apple.mrj.application.apple.menu.about.name=JGit 65*dad52baaSShawn O. Pearce -Dcom.apple.mrj.application.growbox.intrudes=false 66*dad52baaSShawn O. Pearce -Dapple.laf.useScreenMenuBar=true 67*dad52baaSShawn O. Pearce -Xdock:name=JGit 68*dad52baaSShawn O. Pearce ' 69*dad52baaSShawn O. Pearce fi 70*dad52baaSShawn O. Pearce ;; 71*dad52baaSShawn O. Pearceesac 72*dad52baaSShawn O. Pearce 73*dad52baaSShawn O. PearceCLASSPATH="$cp" 74*dad52baaSShawn O. Pearceexport CLASSPATH 75*dad52baaSShawn O. Pearce 76*dad52baaSShawn O. Pearcejava=java 77*dad52baaSShawn O. Pearceif test -n "$JAVA_HOME" 78*dad52baaSShawn O. Pearcethen 79*dad52baaSShawn O. Pearce java="$JAVA_HOME/bin/java" 80*dad52baaSShawn O. Pearcefi 81*dad52baaSShawn O. Pearce 82*dad52baaSShawn O. Pearceexec "$java" $java_args org.eclipse.jgit.pgm.Main "$@" 83*dad52baaSShawn O. Pearceexit 1 84