home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 December / Chip_2000-12_cd1.bin / tema / starof / f_0221 / jvmsetup
Text File  |  2000-05-10  |  1KB  |  70 lines

  1. #!/bin/sh
  2. #
  3. # StarOffice jvmsetup script
  4. # (c) 1999 Sun Microsystems, Inc.
  5.  
  6. # resolve installation directory
  7. sd_platform=`uname -s`
  8. case $sd_platform in
  9.     SCO_SV) test=/bin/test     ;;
  10.     *)      test=/usr/bin/test ;;
  11. esac
  12.  
  13. sd_cwd="`pwd`"
  14. if $test -L "$0" ; then
  15.     sd_basename=`basename "$0"`
  16.     sd_script=`ls -l $0 | sed "s/.*${sd_basename} -> //g"`
  17. else
  18.     sd_script="$0"
  19. fi
  20.  
  21. cd "`dirname "$sd_script"`/.."
  22. sd_binary=`basename "$sd_script"`".bin"
  23. sd_inst="`pwd`"
  24.  
  25. # change back directory
  26. cd "$sd_cwd"
  27.  
  28. sd_fonts=$sd_inst/fonts
  29.  
  30. # set search path for shared libraries
  31. case $sd_platform in
  32.   SunOS)
  33.     sd_arch=`uname -p`
  34.     LD_LIBRARY_PATH=$sd_inst/program:/usr/openwin/lib:/usr/dt/lib:$LD_LIBRARY_PATH
  35.     export LD_LIBRARY_PATH
  36.     ;;
  37.  
  38.   AIX)
  39.     LIBPATH=$sd_inst/program:$LIBPATH
  40.     export LIBPATH
  41.     ;;
  42.  
  43.   HP-UX)
  44.     SHLIB_PATH=$sd_inst/program:/usr/openwin/lib:$SHLIB_PATH
  45.     export SHLIB_PATH
  46.     ;;
  47.  
  48.   IRIX)
  49.     LD_LIBRARYN32_PATH=:$sd_inst/program:$LD_LIBRARYN32_PATH
  50.     export LD_LIBRARYN32_PATH
  51.     ;;
  52.  
  53.   *)
  54.     LD_LIBRARY_PATH=$sd_inst/program:$LD_LIBRARY_PATH
  55.     export LD_LIBRARY_PATH
  56.     ;;
  57. esac
  58.  
  59. # misc. environment variables
  60. SAL_FONTPATH=$sd_fonts/type1:$sd_fonts/75dpi
  61.  
  62. unset XENVIRONMENT
  63.  
  64. export SAL_FONTPATH
  65.  
  66. # execute soffice binary
  67. # there is a bug in solaris sh that prevents the use of "$@"
  68. # because it cannot cope with spaces in directory names
  69. exec "$sd_inst/program/$sd_binary" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
  70.