summaryrefslogtreecommitdiffstats
path: root/scripts/stl-sim
blob: 198d1275ba58a7966f4ac5bbf38f41ff8f131ba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

INPUT_ARGS=$@

if [[ $@ =~ '--python2' ]]; then
    INPUT_ARGS=${@//--python2/}
    source find_python.sh --python2
fi

if [[ $@ =~ '--python3' ]]; then
    INPUT_ARGS=${@//--python3/}
    source find_python.sh --python3
fi

if [ -z "$PYTHON" ]; then
    source find_python.sh
fi

export PYTHONPATH=automation/trex_control_plane/stl
$PYTHON -m trex_stl_lib.trex_stl_sim -p $PWD $INPUT_ARGS