Last change
on this file since 32163 was 19253, checked in by davidb, 15 years ago |
Establishing a source code repository for Veronica's Realistic Book's software
|
File size:
1.6 KB
|
Line | |
---|
1 |
|
---|
2 |
|
---|
3 | function testSource(){
|
---|
4 |
|
---|
5 | if test "$0" != "`echo $0 | sed s/setup\.bash//`" ; then
|
---|
6 | # if $0 contains "setup.bash" we've been run... $0 is shellname if sourced.
|
---|
7 | # One exception is zsh has an option to set it temporarily to the script name
|
---|
8 | if test -z "$ZSH_NAME" ; then
|
---|
9 | # we aren't using zsh
|
---|
10 | rb_not_sourced=true
|
---|
11 | fi
|
---|
12 | fi
|
---|
13 |
|
---|
14 | if test -n "$rb_not_sourced" ; then
|
---|
15 | echo " Error: Make sure you source this script, not execute it. Eg:"
|
---|
16 | echo " $ source setup.bash"
|
---|
17 | echo " or"
|
---|
18 | echo " $ . setup.bash"
|
---|
19 | echo " not"
|
---|
20 | echo " $ ./setup.bash"
|
---|
21 | unset rb_not_sourced
|
---|
22 | exit 1
|
---|
23 | fi
|
---|
24 |
|
---|
25 | if test ! -f setup.bash ; then
|
---|
26 | echo "You must source the script from within the Realistic Books home directory"
|
---|
27 | exit 1
|
---|
28 | fi
|
---|
29 |
|
---|
30 | }
|
---|
31 |
|
---|
32 | testSource
|
---|
33 |
|
---|
34 | if [ -z $REALISTIC_BOOKS_HOME ] ; then
|
---|
35 | export REALISTIC_BOOKS_HOME=`pwd`
|
---|
36 |
|
---|
37 | RBOS=`uname -s | tr '[A-Z]' '[a-z]'`
|
---|
38 |
|
---|
39 | # check for running bash under cygwin
|
---|
40 | if test "`echo $RBOS | sed 's/cygwin//'`" != "$RBOS" ; then
|
---|
41 | RBOS=windows
|
---|
42 | fi
|
---|
43 | export RBOS
|
---|
44 |
|
---|
45 |
|
---|
46 | export RBHOME_INSTALLED=$REALISTIC_BOOKS_HOME/$RBOS
|
---|
47 |
|
---|
48 | export PATH=$RBHOME_INSTALLED/bin:$RBHOME_INSTALLED/bin/script:$PATH
|
---|
49 |
|
---|
50 | export LD_LIBRARY_PATH=$RBHOME_INSTALLED/lib
|
---|
51 | export DYLD_LIBRARY_PATH=$RBHOME_INSTALLED/lib
|
---|
52 |
|
---|
53 | if [ "x$1" != "xsilent" ] ; then
|
---|
54 | echo "*****"
|
---|
55 | echo "* Your environment is now set up to run Realistic Books"
|
---|
56 | echo "****"
|
---|
57 | fi
|
---|
58 | else
|
---|
59 | if [ "x$1" != "xsilent" ] ; then
|
---|
60 | echo "*****"
|
---|
61 | echo "* Your environment is already set up to run Realistic Books"
|
---|
62 | echo "****"
|
---|
63 | fi
|
---|
64 | fi
|
---|
65 |
|
---|
66 |
|
---|
67 | if [ -e devel.sh ] ; then
|
---|
68 | source devel.sh $*
|
---|
69 | fi
|
---|
70 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.