source: branches/Greenstone3/gsdl3/setup.bash@ 3223

Last change on this file since 3223 was 3222, checked in by kjdon, 22 years ago

Initial revision

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 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"
22elif 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 GSDL3OS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30 # check for running bash under cygwin
31 if test "`echo $GSDL3OS | sed 's/cygwin//'`" != "$GSDL3OS" ;
32 then
33 GSDL3OS=windows
34 fi
35 export GSDL3OS
36
37 PATH=$PATH:$GSDL3HOME/bin/script:$GSDL3HOME/bin/$GSDL3OS
38 export PATH
39 MANPATH=$MANPATH:$GSDL3HOME/doc/man
40 export MANPATH
41 CLASSPATH=$GSDL3HOME/lib/java/gsdl3.jar:$GSDL3HOME/lib/java/xercesImpl.jar:$GSDL3HOME/lib/java/xmlParserAPIs.jar:$GSDL3HOME/lib/java/xindice.jar:$GSDL3HOME/lib/java/jaxp.jar:$GSDL3HOME/lib/java/soap.jar:$GSDL3HOME/lib/java/mail.jar:$GSDL3HOME/lib/java/activation.jar
42 export CLASSPATH
43
44 #tomcat stuff
45 CP=$GSDL3HOME/lib/java/gsdl3.jar:$GSDL3HOME/lib/java/xercesImpl.jar:$GSDL3HOME/lib/java/xmlParserAPIs.jar:$GSDL3HOME/lib/java/xindice.jar:$GSDL3HOME/lib/java/jaxp.jar:$GSDL3HOME/lib/java/soap.jar:$GSDL3HOME/lib/java/mail.jar:$GSDL3HOME/lib/java/activation.jar:/research/kjdon/src/tomcat/jakarta-tomcat-4.0.1/common/lib/servlet.jar
46 echo "Your environment has successfully been set up to run Greenstone3"
47fi
48unset gsdl_not_sourced
Note: See TracBrowser for help on using the repository browser.