mirror of https://github.com/secdev/scapy.git
Update scripts to call python2 instead of python when python is not version 2
This commit is contained in:
parent
7a546611c3
commit
6dcd891468
|
@ -1,3 +1,8 @@
|
|||
#! /bin/sh
|
||||
DIR=$(dirname $0)
|
||||
PYTHONPATH=$DIR exec python -m scapy.__init__
|
||||
if python --version | grep -q '^Python 2'; then
|
||||
PYTHON=python
|
||||
else
|
||||
PYTHON=python2
|
||||
fi
|
||||
PYTHONPATH=$DIR exec $PYTHON -m scapy.__init__
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#! /bin/bash
|
||||
DIR=$(dirname $0)/..
|
||||
if python --version | grep -q '^Python 2'; then
|
||||
PYTHON=python
|
||||
else
|
||||
PYTHON=python2
|
||||
fi
|
||||
if [ "$*" == "" ]
|
||||
then
|
||||
PYTHONPATH=$DIR exec python ${DIR}/scapy/tools/UTscapy.py -t regression.uts -f html -l -o /tmp/scapy_regression_test_$(date +%Y%m%d-%H%M%S).html
|
||||
PYTHONPATH=$DIR exec $PYTHON ${DIR}/scapy/tools/UTscapy.py -t regression.uts -f html -l -o /tmp/scapy_regression_test_$(date +%Y%m%d-%H%M%S).html
|
||||
else
|
||||
PYTHONPATH=$DIR exec python ${DIR}/scapy/tools/UTscapy.py "$@"
|
||||
PYTHONPATH=$DIR exec $PYTHON ${DIR}/scapy/tools/UTscapy.py "$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue