"Fossies" - the Fresh Open Source Software Archive

Member "verapdf-greenfield-1.18.6/verapdf-install" (17 Feb 2021, 2157 Bytes) of package /linux/misc/verapdf-installer.zip:


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 and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 # resolve links - $0 may be a softlink
    3 PRG="$0"
    4 
    5 while [ -h "$PRG" ]; do
    6   ls=`ls -ld "$PRG"`
    7   link=`expr "$ls" : '.*-> \(.*\)$'`
    8   if expr "$link" : '/.*' > /dev/null; then
    9     PRG="$link"
   10   else
   11     PRG=`dirname "$PRG"`/"$link"
   12   fi
   13 done
   14 
   15 PRGDIR=`dirname "$PRG"`
   16 BASEDIR=`cd "$PRGDIR/" >/dev/null; pwd`
   17 
   18 # OS specific support.  $var _must_ be set to either true or false.
   19 cygwin=false;
   20 darwin=false;
   21 case "`uname`" in
   22   CYGWIN*) cygwin=true ;;
   23   Darwin*) darwin=true
   24            if [ -z "$JAVA_VERSION" ] ; then
   25              JAVA_VERSION="CurrentJDK"
   26            else
   27              echo "Using Java version: $JAVA_VERSION"
   28            fi
   29            if [ -z "$JAVA_HOME" ]; then
   30               if [ -x "/usr/libexec/java_home" ]; then
   31                   JAVA_HOME=`/usr/libexec/java_home`
   32               else
   33                   JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
   34               fi
   35            fi
   36            ;;
   37 esac
   38 
   39 if [ -z "$JAVA_HOME" ] ; then
   40   if [ -r /etc/gentoo-release ] ; then
   41     JAVA_HOME=`java-config --jre-home`
   42   fi
   43 fi
   44 
   45 # For Cygwin, ensure paths are in UNIX format before anything is touched
   46 if $cygwin ; then
   47   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   48   [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
   49 fi
   50 
   51 # If a specific java binary isn't specified search for the standard 'java' binary
   52 if [ -z "$JAVACMD" ] ; then
   53   if [ -n "$JAVA_HOME"  ] ; then
   54     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
   55       # IBM's JDK on AIX uses strange locations for the executables
   56       JAVACMD="$JAVA_HOME/jre/sh/java"
   57     else
   58       JAVACMD="$JAVA_HOME/bin/java"
   59     fi
   60   else
   61     JAVACMD=`which java`
   62   fi
   63 fi
   64 
   65 if [ ! -x "$JAVACMD" ] ; then
   66   echo "Error: JAVA_HOME is not defined correctly." 1>&2
   67   echo "  We cannot execute $JAVACMD" 1>&2
   68   exit 1
   69 fi
   70 
   71 # For Cygwin, switch paths to Windows format before running java
   72 if $cygwin; then
   73   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
   74   [ -n "$HOME" ] && HOME=`cygpath --path --windows "$HOME"`
   75   [ -n "$BASEDIR" ] && BASEDIR=`cygpath --path --windows "$BASEDIR"`
   76 fi
   77 
   78 cd "$BASEDIR"
   79 java -jar verapdf-izpack-installer-1.18.6.jar "${@}"