#!/bin/bash | |
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
FIDL_TOOLS_DIR="$(dirname "${SCRIPTS_DIR}")/tools/fidl" | |
PYTHON= | |
for p in python3.7 python3.6; do | |
if command -v "${p}" > /dev/null; then | |
PYTHON="${p}" | |
break | |
fi | |
done | |
if [[ -z "${PYTHON}" ]]; then | |
echo 'ERROR: no recent Python found, please install Python 3.6 or 3.7' | |
exit 1 | |
else | |
PYTHONPATH="${FIDL_TOOLS_DIR}" exec "${PYTHON}" -m difl "$@" | |
fi |