1 | #
|
---|
2 | # bash version of .setup file coming with dim distribution
|
---|
3 | # Tested on Linux 7.3 by A.Formica
|
---|
4 | #
|
---|
5 | POSSOSVALUES=HP-UX,AIX,OSF1,SunOS,Solaris,LynxOS,Linux,Darwin
|
---|
6 | echo $POSSOSVALUES
|
---|
7 | if [ ! -z $OS ]; then
|
---|
8 | echo OS is set to $OS
|
---|
9 | TEMP=$OS
|
---|
10 | echo $POSSOSVALUES | grep $TEMP > /dev/null
|
---|
11 | if [ $? != 0 ]; then
|
---|
12 | echo "Unknown OS... setup failed"
|
---|
13 | echo "Possible values are: $POSSOSVALUES"
|
---|
14 | return 1
|
---|
15 | fi
|
---|
16 | else
|
---|
17 | echo "Variable OS must be defined... setup failed"
|
---|
18 | echo "Possible values are: $POSSOSVALUES"
|
---|
19 | return 1
|
---|
20 | fi
|
---|
21 |
|
---|
22 | if [ "${OS}" == "Solaris" ]; then
|
---|
23 | path=(/usr/ccs/bin:$path)
|
---|
24 | echo "Update path " $path
|
---|
25 | fi
|
---|
26 |
|
---|
27 | if [ ! -z $DIMDIR ]; then
|
---|
28 | echo DIMDIR is set to $DIMDIR
|
---|
29 | else
|
---|
30 | export DIMDIR=`pwd`
|
---|
31 | echo DIMDIR is set to $DIMDIR
|
---|
32 | fi
|
---|
33 |
|
---|
34 | if [ ! -z $ODIR ]; then
|
---|
35 | echo ODIR is set to $ODIR
|
---|
36 | else
|
---|
37 | echo "ODIR not defined"
|
---|
38 | case $OS in
|
---|
39 | HP) export ODIR=hp;;
|
---|
40 | AIX) export ODIR=aix;;
|
---|
41 | OSF1) export ODIR=osf;;
|
---|
42 | SunOS) export ODIR=sunos;;
|
---|
43 | Solaris) export ODIR=solaris;;
|
---|
44 | LynxOS) export ODIR=lynxos;;
|
---|
45 | Linux) export ODIR=linux;;
|
---|
46 | Darwin) export ODIR=darwin;;
|
---|
47 | *) echo "Unknown OS... setup failed"; return 1;;
|
---|
48 | esac
|
---|
49 | echo "...setting ODIR to $ODIR"
|
---|
50 | fi
|
---|
51 |
|
---|
52 | if [ "${OS}" == "Linux" ]; then
|
---|
53 | if [ -z $LD_LIBRARY_PATH ]; then
|
---|
54 | export LD_LIBRARY_PATH=${DIMDIR}/${ODIR}
|
---|
55 | else
|
---|
56 | export LD_LIBRARY_PATH=${DIMDIR}/${ODIR}:$LD_LIBRARY_PATH
|
---|
57 | fi
|
---|
58 | fi
|
---|
59 |
|
---|
60 | alias TestServer=$DIMDIR/$ODIR/testServer
|
---|
61 | alias TestClient=$DIMDIR/$ODIR/testClient
|
---|
62 | alias Test_server=$DIMDIR/$ODIR/test_server
|
---|
63 | alias Test_client=$DIMDIR/$ODIR/test_client
|
---|
64 | alias Dns=$DIMDIR/$ODIR/dns
|
---|
65 | alias Dim_get_service=$DIMDIR/$ODIR/dim_get_service
|
---|
66 | alias Dim_send_command=$DIMDIR/$ODIR/dim_send_command
|
---|
67 | alias DimBridge=$DIMDIR/$ODIR/DimBridge
|
---|
68 | alias Did=$DIMDIR/$ODIR/did
|
---|
69 |
|
---|
70 | if [ ! -d $DIMDIR/$ODIR ]; then
|
---|
71 | mkdir $DIMDIR/$ODIR
|
---|
72 | echo Created Directory: $DIMDIR/$ODIR
|
---|
73 | fi
|
---|
74 |
|
---|