Skip to content

Commit ae7d785

Browse files
committed
Use just "python" in generate-examples.sh
It does the right thng under Travis CI.
1 parent 7cd7ba0 commit ae7d785

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

scripts/generate-examples.sh

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
#!/bin/bash
2-
3-
# Ugly way to get any python interpreter. This is necessary because the script will run
4-
# both with Python 2.7 and Python 3.x under Travis.
5-
PYTHONS=$(which python3 python2.7 python)
6-
PYTHON=$(echo $PYTHONS | cut -d" " -f1)
7-
8-
if [ -z "${PYTHON}" ]; then
9-
echo "ERROR: no Python interpreter found."
10-
exit 1
11-
fi
12-
echo "Using Python interpreter ${PYTHON}"
13-
14-
# Return an error if any of the following commands fails.
152
set -e
3+
164
echo "example1.cmd, --show-all-calls"
17-
${PYTHON} cmd-call-graph.py --show-all-calls < examples/example1.cmd > examples/example1.dot
5+
python cmd-call-graph.py --show-all-calls < examples/example1.cmd > examples/example1.dot
186
echo
197
echo "example1.cmd, --show-all-calls --show-node-stats"
20-
${PYTHON} cmd-call-graph.py --show-all-calls --show-node-stats < examples/example1.cmd > examples/example1-nodestats.dot
8+
python cmd-call-graph.py --show-all-calls --show-node-stats < examples/example1.cmd > examples/example1-nodestats.dot
219
echo
2210
echo "example1.cmd, without --show-all-calls"
23-
${PYTHON} cmd-call-graph.py < examples/example1.cmd > examples/example1-noshowall.dot
11+
python cmd-call-graph.py < examples/example1.cmd > examples/example1-noshowall.dot
2412
echo
2513
echo "loc.cmd, with --show-node-status and without --show-all-calls"
26-
${PYTHON} cmd-call-graph.py --show-node-stats < examples/loc.cmd > examples/loc.dot
14+
python cmd-call-graph.py --show-node-stats < examples/loc.cmd > examples/loc.dot
2715

2816
dot -Tpng examples/example1.dot > examples/example1.png
2917
dot -Tpng examples/example1-nodestats.dot > examples/example1-nodestats.png

0 commit comments

Comments
 (0)