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

« back to all changes in this revision

Viewing changes to sbin/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:
3
3
dirname=`dirname $0`
4
4
 
5
5
if [ `echo $dirname | grep "^/" -c` -eq 1 ]; then
6
 
        path=$dirname/..
 
6
        echo $path
7
7
else
8
 
        cd `pwd`/$dirname/.. > /dev/null
9
 
        path=`pwd`
10
 
        cd - > /dev/null
 
8
        cd `pwd`/$dirname/.. > /dev/null
 
9
        path=`pwd`
 
10
        cd - > /dev/null
11
11
fi
12
12
 
13
 
export PYTHONPATH=$path/lib:/usr/share/exabgp
 
13
export PYTHONPATH=$path/lib:/usr/share/exabgp/lib/2.0.7
14
14
export ETC=$path/etc/exabgp
15
15
 
 
16
if [ "$INTERPRETER" != "" ]
 
17
then
 
18
        INTERPRETER=`which $INTERPRETER`
 
19
fi
 
20
 
16
21
PYPY=`which pypy`
17
22
PYTHON27=`which python2.7`
18
23
PYTHON26=`which python2.6`
49
54
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
55
APPLICATION=`echo $APPLICATIONS | awk '{ print $1; }'`
51
56
 
52
 
$INTERPRETER -m exabgp.debug $APPLICATION $*
 
57
exec $INTERPRETER -m exabgp.debug $APPLICATION $*