"Fossies" - the Fresh Open Source Software Archive

Member "jdtaus-editor-3.1/bin/Editor" (28 Oct 2016, 4395 Bytes) of package /linux/misc/jdtaus-editor-3.1-app.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Editor": 3.0-app_vs_3.1-app.

    1 #!/bin/sh
    2 #
    3 #   Copyright (C) 2012-2015 Christian Schulte <cs@schulte.it>
    4 #
    5 #   All rights reserved. Copying, distribution, use or modification
    6 #   without prior written permission of the copyright holder prohibited.
    7 #
    8 #   THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
    9 #   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   10 #   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   11 #   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   12 #   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   13 #   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
   14 #   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   15 #   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
   16 #   IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
   17 #   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
   18 #   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   19 #
   20 #   $SchulteIT: COPYRIGHT.txt 12215 2015-01-07 21:25:26Z schulte $
   21 
   22 
   23 # resolve links - $0 may be a softlink
   24 PRG="$0"
   25 
   26 while [ -h "$PRG" ]; do
   27   ls=`ls -ld "$PRG"`
   28   link=`expr "$ls" : '.*-> \(.*\)$'`
   29   if expr "$link" : '/.*' > /dev/null; then
   30     PRG="$link"
   31   else
   32     PRG=`dirname "$PRG"`/"$link"
   33   fi
   34 done
   35 
   36 PRGDIR=`dirname "$PRG"`
   37 BASEDIR=`cd "$PRGDIR/.." >/dev/null; pwd`
   38 
   39 # Reset the REPO variable. If you need to influence this use the environment setup file.
   40 REPO=
   41 
   42 
   43 # OS specific support.  $var _must_ be set to either true or false.
   44 cygwin=false;
   45 darwin=false;
   46 case "`uname`" in
   47   CYGWIN*) cygwin=true ;;
   48   Darwin*) darwin=true
   49            if [ -z "$JAVA_VERSION" ] ; then
   50              JAVA_VERSION="CurrentJDK"
   51            else
   52              echo "Using Java version: $JAVA_VERSION"
   53            fi
   54            if [ -z "$JAVA_HOME" ]; then
   55               if [ -x "/usr/libexec/java_home" ]; then
   56                   JAVA_HOME=`/usr/libexec/java_home`
   57               else
   58                   JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
   59               fi
   60            fi       
   61            ;;
   62 esac
   63 
   64 if [ -z "$JAVA_HOME" ] ; then
   65   if [ -r /etc/gentoo-release ] ; then
   66     JAVA_HOME=`java-config --jre-home`
   67   fi
   68 fi
   69 
   70 # For Cygwin, ensure paths are in UNIX format before anything is touched
   71 if $cygwin ; then
   72   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   73   [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
   74 fi
   75 
   76 # If a specific java binary isn't specified search for the standard 'java' binary
   77 if [ -z "$JAVACMD" ] ; then
   78   if [ -n "$JAVA_HOME"  ] ; then
   79     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
   80       # IBM's JDK on AIX uses strange locations for the executables
   81       JAVACMD="$JAVA_HOME/jre/sh/java"
   82     else
   83       JAVACMD="$JAVA_HOME/bin/java"
   84     fi
   85   else
   86     JAVACMD=`which java`
   87   fi
   88 fi
   89 
   90 if [ ! -x "$JAVACMD" ] ; then
   91   echo "Error: JAVA_HOME is not defined correctly." 1>&2
   92   echo "  We cannot execute $JAVACMD" 1>&2
   93   exit 1
   94 fi
   95 
   96 if [ -z "$REPO" ]
   97 then
   98   REPO="$BASEDIR"/lib
   99 fi
  100 
  101 CLASSPATH="$BASEDIR"/etc:"$REPO"/*
  102 
  103 ENDORSED_DIR=
  104 if [ -n "$ENDORSED_DIR" ] ; then
  105   CLASSPATH=$BASEDIR/$ENDORSED_DIR/*:$CLASSPATH
  106 fi
  107 
  108 if [ -n "$CLASSPATH_PREFIX" ] ; then
  109   CLASSPATH=$CLASSPATH_PREFIX:$CLASSPATH
  110 fi
  111 
  112 # For Cygwin, switch paths to Windows format before running java
  113 if $cygwin; then
  114   [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  115   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  116   [ -n "$HOME" ] && HOME=`cygpath --path --windows "$HOME"`
  117   [ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
  118   [ -n "$REPO" ] && REPO=`cygpath --path --windows "$REPO"`
  119 fi
  120 
  121 exec "$JAVACMD" $JAVA_OPTS -Djava.ext.dirs="$BASEDIR"/lib/ext -Dapple.laf.useScreenMenuBar=true -Djava.net.useSystemProxies=true -Dhttp.keepAlive=false -Dcom.sun.jndi.dns.timeout.initial=2000 -Dcom.sun.jndi.dns.timeout.retries=2 -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -Dcom.sun.xml.bind.v2.runtime.JAXBContextImpl.fastBoot=true -Dorg.jomc.modlet.ModelContext.defaultLogLevel=ALL -Dorg.jomc.ri.DefaultObjectManager.defaultLogLevel=ALL -Dorg.jomc.ri.DefaultObjectManager.defaultModelObjectClasspathResolutionEnabled=true -splash:"$BASEDIR"/bin/jdtaus.png \
  122   -classpath "$CLASSPATH" \
  123   -Dapp.name="unix" \
  124   -Dapp.pid="$$" \
  125   -Dapp.repo="$REPO" \
  126   -Dapp.home="$BASEDIR" \
  127   -Dbasedir="$BASEDIR" \
  128   org.jdtaus.editor.application.Main \
  129   "$@"