home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / OpenOffice.idb / usr / OpenOffice / program / setup.z / setup
Encoding:
Text File  |  2003-07-29  |  4.7 KB  |  169 lines

  1. #!/bin/sh
  2. #*************************************************************************
  3. #
  4. #   $RCSfile: setup.sh,v $
  5. #
  6. #   $Revision: 1.11.4.3 $
  7. #
  8. #   last change: $Author: mh $ $Date: 2002/05/31 10:05:05 $
  9. #
  10. #   The Contents of this file are made available subject to the terms of
  11. #   either of the following licenses
  12. #
  13. #          - GNU Lesser General Public License Version 2.1
  14. #          - Sun Industry Standards Source License Version 1.1
  15. #
  16. #   Sun Microsystems Inc., October, 2000
  17. #
  18. #   GNU Lesser General Public License Version 2.1
  19. #   =============================================
  20. #   Copyright 2000 by Sun Microsystems, Inc.
  21. #   901 San Antonio Road, Palo Alto, CA 94303, USA
  22. #
  23. #   This library is free software; you can redistribute it and/or
  24. #   modify it under the terms of the GNU Lesser General Public
  25. #   License version 2.1, as published by the Free Software Foundation.
  26. #
  27. #   This library is distributed in the hope that it will be useful,
  28. #   but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  30. #   Lesser General Public License for more details.
  31. #
  32. #   You should have received a copy of the GNU Lesser General Public
  33. #   License along with this library; if not, write to the Free Software
  34. #   Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  35. #   MA  02111-1307  USA
  36. #
  37. #
  38. #   Sun Industry Standards Source License Version 1.1
  39. #   =================================================
  40. #   The contents of this file are subject to the Sun Industry Standards
  41. #   Source License Version 1.1 (the "License"); You may not use this file
  42. #   except in compliance with the License. You may obtain a copy of the
  43. #   License at http://www.openoffice.org/license.html.
  44. #
  45. #   Software provided under this License is provided on an "AS IS" basis,
  46. #   WITHOUT WARRUNTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
  47. #   WITHOUT LIMITATION, WARRUNTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
  48. #   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
  49. #   See the License for the specific provisions governing your rights and
  50. #   obligations concerning the Software.
  51. #
  52. #   The Initial Developer of the Original Code is: Sun Microsystems, Inc..
  53. #
  54. #   Copyright: 2000 by Sun Microsystems, Inc.
  55. #
  56. #   All Rights Reserved.
  57. #
  58. #   Contributor(s): _______________________________________
  59. #
  60. #
  61. #
  62. #*************************************************************************
  63.  
  64. # resolve installation directory
  65. sd_platform=`uname -s`
  66. case $sd_platform in
  67.         SCO_SV) test=/bin/test     ;;
  68.         NetBSD) test=/bin/test     ;;
  69.         FreeBSD) test=/bin/test     ;;
  70.         *)      test=/usr/bin/test ;;
  71. esac
  72.  
  73. sd_cwd="`pwd`"
  74. if $test -L "$0" ; then
  75.         sd_basename=`basename $0`
  76.         sd_script=`ls -l $0 | sed "s/.*${sd_basename} -> //g"`
  77. else
  78.         sd_script="$0"
  79. fi
  80.  
  81. cd "`dirname "$sd_script"`"
  82. sd_archive_path=`pwd`
  83.  
  84. sd_setup_binary=setup.bin
  85. sd_platform=`uname -s`
  86. sd_release=`uname -r`
  87.  
  88. if [ `basename "$sd_archive_path"` = "program" ]; then
  89.     sd_fonts=`dirname "$sd_archive_path"`
  90.     sd_fonts="$sd_fonts/share/fonts/truetype"
  91. else
  92.     sd_fonts="$sd_archive_path"
  93. fi
  94. if [ "x$SAL_FONTPATH_PRIVATE" = "x" ]; then 
  95.     SAL_FONTPATH_PRIVATE="$sd_fonts"
  96. else
  97.     SAL_FONTPATH_PRIVATE="$sd_fonts;$SAL_FONTPATH_PRIVATE"
  98. fi
  99. export SAL_FONTPATH_PRIVATE
  100.  
  101. if [ -x "./sopatchlevel.sh" ]; then
  102.         ./sopatchlevel.sh
  103.         if [ $? -eq 1 ]; then
  104.                 exit 0;
  105.         fi
  106. fi
  107.  
  108. # disable File Locking for NFS2 Linux Servers
  109. #STAR_PROFILE_LOCKING_DISABLED=1
  110. #export STAR_PROFILE_LOCKING_DISABLED
  111.  
  112. # some platforms may need an additional search path for X11 shared libraries
  113. case $sd_platform in
  114.   SunOS)
  115.      SAL_IGNOREXERRORS=1
  116.      export SAL_IGNOREXERRORS
  117.      LD_LIBRARY_PATH=./local:.:..:$sd_archive_path:/usr/openwin/lib:$LD_LIBRARY_PATH
  118.      export LD_LIBRARY_PATH
  119.      ;;
  120.   Linux)
  121.      LD_LIBRARY_PATH=./local:.:..:$sd_archive_path:$LD_LIBRARY_PATH
  122.      export LD_LIBRARY_PATH
  123.      ;;
  124.   NetBSD)
  125.      LD_LIBRARY_PATH=./local:.:..:$sd_archive_path:$LD_LIBRARY_PATH
  126.      export LD_LIBRARY_PATH
  127.      ;;
  128.   FreeBSD)
  129.      LD_LIBRARY_PATH=./local:.:..:$sd_archive_path:$LD_LIBRARY_PATH
  130.      export LD_LIBRARY_PATH
  131.      ;;
  132.   IRIX)
  133.      LD_LIBRARYN32_PATH=./local:.:..:$sd_archive_path:$LD_LIBRARYN32_PATH
  134.      export LD_LIBRARYN32_PATH
  135.      ;;
  136.   IRIX64)
  137.      LD_LIBRARYN32_PATH=./local:.:..:$sd_archive_path:$LD_LIBRARYN32_PATH
  138.      export LD_LIBRARYN32_PATH
  139.      ;;
  140.       *)
  141.      ;;
  142. esac
  143.  
  144. case $sd_release in
  145.     5.5.1)
  146.         PATCH1=`showrev -p | grep 103640`
  147.         if [ "$PATCH1" != "" ]; then
  148.             PATCH1=INSTALLED
  149.         else
  150.             PATCH1=MISSING
  151.         fi
  152.         PATCH2=`showrev -p | grep 103566`
  153.         if [ "$PATCH2" != "" ]; then
  154.             PATCH2=INSTALLED
  155.         else
  156.             PATCH2=MISSING
  157.         fi
  158.  
  159.         THREAD_PATCH_NEEDED=TRUE
  160.         export PATCH1 PATCH2 THREAD_PATCH_NEEDED
  161.         ;;
  162.     *)
  163.         ;;
  164. esac
  165.  
  166. # execute setup binary
  167. exec "$sd_archive_path/$sd_setup_binary" $*
  168.  
  169.