+

Last commit for PMS.sh: 3aa8f5b1e4d30c79bdc29d792d1b823de31c8dd7

Initial commit

root [2014-05-05 22:57:02]
Initial commit
  1. #!/bin/sh
  2.  
  3. CMD=`readlink -f $0`
  4. DIRNAME=`dirname "$CMD"`
  5.  
  6. # OS specific support (must be 'true' or 'false').
  7. cygwin=false;
  8. case "`uname`" in
  9. CYGWIN*)
  10. cygwin=true
  11. ;;
  12. esac
  13.  
  14. # For Cygwin, ensure paths are in UNIX format before anything is touched
  15. if $cygwin ; then
  16. [ -n "$PMS_HOME" ] &&
  17. PMS_HOME=`cygpath --unix "$PMS_HOME"`
  18. [ -n "$JAVA_HOME" ] &&
  19. JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  20. fi
  21.  
  22. # Setup PMS_HOME
  23. if [ "x$PMS_HOME" = "x" ]; then
  24. PMS_HOME="$DIRNAME"
  25. fi
  26.  
  27. export PMS_HOME
  28. # XXX: always cd to the working dir: https://code.google.com/p/ps3mediaserver/issues/detail?id=730
  29. cd "$PMS_HOME"
  30.  
  31. # Setup the JVM
  32. if [ "x$JAVA" = "x" ]; then
  33. if [ "x$JAVA_HOME" != "x" ]; then
  34. JAVA="$JAVA_HOME/bin/java"
  35. else
  36. JAVA="java"
  37. fi
  38. fi
  39.  
  40. # Setup the classpath
  41. # since we always cd to the working dir, these a) can be unqualified and b) *must*
  42. # be unqualified: https://code.google.com/p/ps3mediaserver/issues/detail?id=1122
  43. PMS_JARS="update.jar:pms.jar"
  44.  
  45. # For Cygwin, switch paths to Windows format before running java
  46. if $cygwin; then
  47. PMS_HOME=`cygpath --path --windows "$PMS_HOME"`
  48. JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  49. fi
  50.  
  51. # Configure fontconfig (used by our build of ffmpeg)
  52. if [ "x$FONTCONFIG_PATH" = "x" ]; then
  53. FONTCONFIG_PATH=/etc/fonts
  54. export FONTCONFIG_PATH
  55. fi
  56. if [ "x$FONTCONFIG_FILE" = "x" ]; then
  57. FONTCONFIG_FILE=/etc/fonts/fonts.conf
  58. export FONTCONFIG_FILE
  59. fi
  60.  
  61. # Execute the JVM
  62. exec "$JAVA" $JAVA_OPTS -Xmx768M -Xss1024k -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djna.nosys=true -classpath "$PMS_JARS" net.pms.PMS "$@"