home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / version.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2004-08-28  |  790 b   |  32 lines

  1. #!/bin/sh
  2. # -----------------------------------------------------------------------------
  3. # Version Script for the CATALINA Server
  4. #
  5. # $Id: version.sh,v 1.1 2004/06/30 15:25:31 funkman Exp $
  6. # -----------------------------------------------------------------------------
  7.  
  8. # resolve links - $0 may be a softlink
  9. PRG="$0"
  10.  
  11. while [ -h "$PRG" ] ; do
  12.   ls=`ls -ld "$PRG"`
  13.   link=`expr "$ls" : '.*-> \(.*\)$'`
  14.   if expr "$link" : '.*/.*' > /dev/null; then
  15.     PRG="$link"
  16.   else
  17.     PRG=`dirname "$PRG"`/"$link"
  18.   fi
  19. done
  20.  
  21. PRGDIR=`dirname "$PRG"`
  22. EXECUTABLE=catalina.sh
  23.  
  24. # Check that target executable exists
  25. if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
  26.   echo "Cannot find $PRGDIR/$EXECUTABLE"
  27.   echo "This file is needed to run this program"
  28.   exit 1
  29. fi
  30.  
  31. exec "$PRGDIR"/"$EXECUTABLE" version "$@"
  32.