daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Jun 13th, 2012 24 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. #
  4. # (c) Copyright 1999-2010 Netop Tech AG
  5. #
  6. # A simple shell script to launch the client software on a Linux/Unix
  7. # system.
  8. #
  9.  
  10. #
  11. # Make sure our current working dir is set to the location of this script
  12. #
  13. cd `dirname $0`
  14.  
  15. #
  16. # Find Java (5.0+)
  17. #
  18. if [ -z "${JAVACMD}" -a -x runtime/linux-i686/jre/bin/java ]; then
  19.         JAVACMD=runtime/linux-i686/jre/bin/java
  20. fi
  21. if [ -z "${JAVACMD}" -a -x runtime/linux-x64/jre/bin/java ]; then
  22.     system_arch=`uname -m 2>/dev/null`
  23.     if [ "${system_arch}" = "x86_64" ]; then
  24.         JAVACMD=runtime/linux-x64/jre/bin/java
  25.     fi
  26. fi
  27. if [ -z "${JAVACMD}" ]; then
  28.     JAVACMD=`which java 2> /dev/null`
  29.     if [ ! -x "${JAVACMD}" ]; then
  30.         JAVACMD=
  31.     fi
  32. fi
  33. if [ -z "${JAVACMD}" -a -n "${JAVA_HOME}"  ]; then
  34.         JAVACMD="${JAVA_HOME}/bin/java"
  35. fi
  36. if [ ! -x "${JAVACMD}" ]; then
  37.         echo "Error: JAVA_HOME is not defined!" 1>&2
  38.         echo "Please ensure Java 5.0 or higher is installed and java is on the path" 1>&2
  39.         exit 1
  40. fi
  41.  
  42. #
  43. # Construct the classpath
  44. #
  45. if [ "X`echo -n`" = "X-n" ]; then
  46.     echo_n() { echo ${1+"$@"}"\c"; }
  47. else
  48.     echo_n() { echo -n ${1+"$@"}; }
  49. fi
  50.  
  51. #
  52. # Construct our classpath.  The zip file(s) are used for custom messages.  We need to ensure
  53. # these add to the classpath first so they take priority (if they exist).
  54. #
  55. classpath=`(ls lib-ext/client-custom-messages.zip 2>/dev/null; ls lib/*.jar) | while read line
  56. do
  57.         echo_n "${line}:"
  58. done`
  59.  
  60. #
  61. # Run the program
  62. #
  63. exec "${JAVACMD}" -classpath "${classpath}"  \
  64.         -Dclient.home=. biz.papercut.pcng.client.uit.UserClient "$@"
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top