source: trunk/gsdl3/setup.bash@ 3695

Last change on this file since 3695 was 3695, checked in by kjdon, 21 years ago

small change

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1# if this file is executed, /bin/sh is used, as we don't start with #!
2# this should work under ash, bash, zsh, ksh, sh style shells.
3
4# make sure we are sourced, and not run
5
6if test "$0" != "`echo $0 | sed s/setup\.bash//`" ; then
7# if $0 contains "setup.bash" we've been run... $0 is shellname if sourced.
8# One exception is zsh has an option to set it temporarily to the script name
9 if test -z "$ZSH_NAME" ; then
10 # we aren't using zsh
11 gsdl_not_sourced=true
12 fi
13fi
14
15if test -n "$gsdl_not_sourced" ; then
16 echo " Error: Make sure you source this script, not execute it. Eg:"
17 echo " $ source setup.bash"
18 echo " or"
19 echo " $ . ./setup.bash"
20 echo " not"
21 echo " $ ./setup.bash"
22#elif test -n "$GSDL3HOME" ; then
23# echo "Your environment is already set up for Greenstone3!"
24elif test ! -f setup.bash ; then
25 echo "You must source the script from within the Greenstone home directory"
26else
27 GSDL3HOME=`pwd`
28 export GSDL3HOME
29 GSDLOS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30 # check for running bash under cygwin
31 if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
32 then
33 GSDLOS=windows
34 fi
35 export GSDLOS
36
37 PATH=$PATH:$GSDL3HOME/bin/script:$GSDL3HOME/bin
38 export PATH
39 MANPATH=$MANPATH:$GSDL3HOME/doc/man
40 export MANPATH
41
42 CLASSPATH=$GSDL3HOME/resources/java:$GSDL3HOME/src/java:$GSDL3HOME/comms/tomcat/jakarta/common/lib/servlet.jar
43 for JARFILE in $GSDL3HOME/lib/java/*; do
44 CLASSPATH=$CLASSPATH:$JARFILE
45 done
46 export CLASSPATH
47
48 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GSDL3HOME/lib
49 export LD_LIBRARY_PATH
50
51 #set up java - should this be done here?
52 JAVA_HOME=/usr/local/share/j2sdk1.4.0/
53 export JAVA_HOME
54 PATH=/usr/local/share/j2sdk1.4.0/bin:$PATH
55 export PATH
56
57 #set up java options for catalina
58 CATALINA_OPTS="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DGSDLHOME=$GSDLHOME -DPATH=$PATH"
59 export CATALINA_OPTS
60
61 echo "Your environment has successfully been set up to run Greenstone3"
62 if test ! -n "$GSDLHOME" ; then
63 echo "However, if you want to run greenstone 2 compatible building, then you need to 'source setup.bash' in the home directory of your greenstone 2 installation, and then re-source this script"
64 fi
65
66
67
68fi
69
70
71unset gsdl_not_sourced
72
73
74
75
76
Note: See TracBrowser for help on using the repository browser.