home *** CD-ROM | disk | FTP | other *** search
/ Chip: Linux Special / CorelLinux_CHIP.iso / StarOffice / office51 / f_490_1 / SPADMIN
Encoding:
Text File  |  1999-08-06  |  1.2 KB  |  63 lines

  1. #!/bin/sh
  2. #
  3. # Sun Microsystems Printer Admin
  4. # (c) 1999, Sun Microsystems, Inc.
  5.  
  6. sd_cwd=`pwd`
  7.  
  8. # locate StarOffice installation directory and binary name
  9. sd_inst=`ls -l $0 | sed 's/.* //g'`
  10. cd `dirname $sd_inst`/..
  11. sd_binary=`basename $0`".bin"
  12. sd_inst=`pwd`
  13.  
  14. # change back directory
  15. cd $sd_cwd
  16.  
  17. sd_fonts=$sd_inst/fonts
  18. sd_platform=`uname -s`
  19.  
  20.  
  21. # set search path for shared libraries
  22. case $sd_platform in
  23.   SunOS)
  24.     LD_LIBRARY_PATH=$sd_inst/service:$sd_inst/lib:/usr/openwin/lib:$LD_LIBRARY_PATH
  25.     export LD_LIBRARY_PATH
  26.     ;;
  27.  
  28.   AIX)
  29.     LIBPATH=$sd_inst/service:$sd_inst/lib:$LIBPATH
  30.     export LIBPATH
  31.     ;;
  32.  
  33.   HP-UX)
  34.     SHLIB_PATH=$sd_inst/service:$sd_inst/lib:/usr/openwin/lib:$SHLIB_PATH
  35.     export SHLIB_PATH
  36.     ;;
  37.    IRIX)
  38.     LD_LIBRARYN32_PATH=:$sd_inst/service:$sd_inst/lib:$LD_LIBRARYN32_PATH
  39.     export LD_LIBRARYN32_PATH
  40.     ;;
  41.       *)
  42.     LD_LIBRARY_PATH=$sd_inst/service:$sd_inst/lib:$LD_LIBRARY_PATH
  43.     export LD_LIBRARY_PATH
  44.     ;;
  45. esac
  46.  
  47. # misc. environment variables
  48. SAL_FONTPATH=$sd_fonts/type1,$sd_fonts/75dpi
  49. XPPATH=$sd_inst/xp3
  50.  
  51. unset XENVIRONMENT
  52.  
  53. export SAL_FONTPATH XPPATH
  54.  
  55. # execute soffice binary
  56. if [ -f $sd_inst/service/$sd_binary ]
  57. then
  58.     exec $sd_inst/service/$sd_binary "$@"
  59. else
  60.     exec $sd_inst/bin/$sd_binary "$@"
  61. fi
  62.  
  63.