~ubuntu-branches/ubuntu/trusty/exabgp/trusty

« back to all changes in this revision

Viewing changes to build/scripts-2.7/exabgp

  • Committer: Package Import Robot
  • Author(s): Henry-Nicolas Tourneur
  • Date: 2012-03-22 12:00:00 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120322120000-v4aj8h69mhpmgbjq
Tags: 2.0.7-1

* New upstream release
* Fix bad clean target for build/ directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
dirname=`dirname $0`
4
 
 
5
 
if [ `echo $dirname | grep "^/" -c` -eq 1 ]; then
6
 
        path=$dirname/..
7
 
else
8
 
        cd `pwd`/$dirname/.. > /dev/null
9
 
        path=`pwd`
10
 
        cd - > /dev/null
11
 
fi
12
 
 
13
 
export PYTHONPATH=$path/lib:/usr/share/exabgp
14
 
export ETC=$path/etc/exabgp
15
 
 
16
 
PYPY=`which pypy`
17
 
PYTHON27=`which python2.7`
18
 
PYTHON26=`which python2.6`
19
 
PYTHON25=`which python2.5`
20
 
PYTHON24=`which python2.4`
21
 
PYTHON2=`which python2`
22
 
PYTHON=`which python`
23
 
 
24
 
if [ -f "$PYPY" ]
25
 
then
26
 
        INTERPRETER=$PYPY
27
 
elif [ -f "$PYTHON27" ]
28
 
then
29
 
        INTERPRETER=$PYTHON27
30
 
elif [ -f "$PYTHON26" ]
31
 
then
32
 
        INTERPRETER=$PYTHON26
33
 
elif [ -f "$PYTHON25" ]
34
 
then
35
 
        INTERPRETER=$PYTHON25
36
 
elif [ -f "$PYTHON24" ]
37
 
then
38
 
        INTERPRETER=$PYTHON24
39
 
elif [ -f "$PYTHON2" ]
40
 
then
41
 
        INTERPRETER=$PYTHON2
42
 
elif [ -f "$PYTHON" ]
43
 
then
44
 
        INTERPRETER=$PYTHON
45
 
else
46
 
        INTERPRETER=python
47
 
fi
48
 
 
49
 
APPLICATIONS=`$INTERPRETER -c "import sys,os; print ' '.join(os.path.join(_,'exabgp','application.py') for _ in sys.path if os.path.isfile('/'.join((_,'exabgp/application.py'))))"`
50
 
APPLICATION=`echo $APPLICATIONS | awk '{ print $1; }'`
51
 
 
52
 
$INTERPRETER -m exabgp.debug $APPLICATION $*