| 1 | #!/bin/sh |
| 2 | |
| 3 | path="$(cd "$(dirname "$0")"/../.. ; pwd)" |
| 4 | |
| 5 | export PYTHONPATH="$path"/src |
| 6 | |
| 7 | for INTERPRETER in "$INTERPRETER" pypy python2.7 python2.6 python2 python; do |
| 8 | INTERPRETER="$(command -v "$INTERPRETER")" && break |
| 9 | done |
| 10 | |
| 11 | APPLICATION="$("$INTERPRETER" -c " |
| 12 | import sys |
| 13 | import os |
| 14 | |
| 15 | path = [os.path.join(_,'exabgp') |
| 16 | for _ in sys.path |
| 17 | if os.path.isfile('/'.join((_, 'exabgp', 'application', 'bgp.py')))][0] |
| 18 | |
| 19 | def remove (file): |
| 20 | try: os.remove(file) |
| 21 | except: pass |
| 22 | |
| 23 | [remove(os.path.join(r,f)) for r,d,fs in os.walk(path) for f in fs if f.endswith('.pyc')] |
| 24 | |
| 25 | ")" |
| 26 | |
| 27 | echo done |