blob: dba905b1e932900d38e485c33d1354b3b914b8cf [file] [log] [blame] [edit]
#!/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