Last change
on this file since 6115 was 2943, checked in by sjboddie, 22 years ago |
Various shell scripts using "tr A-Z a-z" were altered as this doesn't work
with some (solaris for one) versions of tr.
|
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.4 KB
|
Rev | Line | |
---|
[2719] | 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 |
|
---|
| 6 | if 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
|
---|
[2709] | 13 | fi
|
---|
[2719] | 14 |
|
---|
| 15 | if 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 "$GSDLHOME" ; then
|
---|
| 23 | echo "Your environment is already set up for Greenstone!"
|
---|
| 24 | elif test ! -f setup.bash ; then
|
---|
| 25 | echo "You must source the script from within the Greenstone home directory"
|
---|
| 26 | else
|
---|
[2906] | 27 | GSDLHOME=`pwd`
|
---|
| 28 | export GSDLHOME
|
---|
[2943] | 29 | GSDLOS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
---|
[2749] | 30 | # check for running bash under cygwin
|
---|
[2719] | 31 | if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
|
---|
| 32 | then
|
---|
| 33 | GSDLOS=windows
|
---|
| 34 | fi
|
---|
[2906] | 35 | export GSDLOS
|
---|
| 36 |
|
---|
| 37 | PATH=$PATH:$GSDLHOME/bin/script:$GSDLHOME/bin/$GSDLOS
|
---|
| 38 | export PATH
|
---|
| 39 | MANPATH=$MANPATH:$GSDLHOME/packages/mg/man
|
---|
| 40 | export MANPATH
|
---|
[2719] | 41 | echo "Your environment has successfully been set up to run Greenstone"
|
---|
| 42 | fi
|
---|
| 43 | unset gsdl_not_sourced
|
---|
Note:
See
TracBrowser
for help on using the repository browser.