~ubuntu-branches/ubuntu/trusty/coccinelle/trusty-proposed

« back to all changes in this revision

Viewing changes to env.sh

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2009-09-08 13:06:20 UTC
  • mfrom: (7.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090908130620-s33aehu14xddef4u
Tags: 0.1.10.deb-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/control: build-depend on python2.6-dev,
    set XB-Python-Version to 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
#!!!!You need to source me with "source env.sh" from the good directory!!!!
6
6
 
 
7
# 14 Aug 2009 Try likely locations for support files
 
8
 
7
9
if [ "$1" ] ; then
8
10
        DIR=$1
9
11
else
11
13
fi
12
14
 
13
15
if [ ! -r $DIR/standard.iso ]
14
 
    then echo "There is no standard.iso in '$DIR'. 
15
 
Are you sure you run this script from the coccinelle directory ?
16
 
Alternatively, provide the coccinelle directory as the first argument.
 
16
then
 
17
   if [ -r /usr/local/share/coccinelle/standard.iso ]
 
18
   then
 
19
      echo "standard.iso not found in '$DIR' using /usr/local/share/coccinelle"
 
20
      DIR="/usr/local/share/coccinelle"
 
21
   else
 
22
# The following won't work with "source env.sh" under bash
 
23
      if [ -r `dirname $0`/standard.iso ]
 
24
      then
 
25
         echo "standard.iso not found in '$DIR' using `dirname $0`"
 
26
         DIR=`dirname $0`
 
27
      fi
 
28
   fi
 
29
fi
 
30
 
 
31
if [ ! -r $DIR/standard.iso ]
 
32
    then echo "standard.iso not found in '$DIR'. 
 
33
Give its directory as the first argument.
17
34
";
18
35
else
19
36
 
28
45
 
29
46
# To find the data/ files such as the default standard.h file.
30
47
# Cf also globals/config.ml
31
 
echo setting COCCINELLE_HOME=${COCCINELLE_HOME:=$DIR}
 
48
echo setting COCCINELLE_HOME=$DIR
 
49
COCCINELLE_HOME=$DIR                            ; export COCCINELLE_HOME
32
50
 
33
51
# To find pycaml dynamic library
34
 
echo setting LD_LIBRARY_PATH=${LD_LIBRARY_PATH:=$COCCINELLE_HOME:$LD_LIBRARY_PATH}
 
52
echo adding $COCCINELLE_HOME to LD_LIBRARY_PATH
 
53
LD_LIBRARY_PATH=$COCCINELLE_HOME:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH
35
54
 
36
55
# To find .py files like the one in python/coccib
37
 
echo setting PYTHONPATH=${PYTHONPATH:=$COCCINELLE_HOME/python:$PYTHONPATH}
38
 
 
39
 
export COCCINELLE_HOME LD_LIBRARY_PATH PYTHONPATH
 
56
echo adding $COCCINELLE_HOME/python to PYTHONPATH
 
57
PYTHONPATH=$COCCINELLE_HOME/python:PYTHONPATH   ; export PYTHONPATH
40
58
 
41
59
fi
42
60