#!/bin/bash
# Build and start Netron as a Python web server from local directory
[ -d node_modules ] || npm install
rm -rf ./build/python
python ./setup.py --quiet build
PYTHON_VERSION=$(python -c "import sys; print('.'.join(str(x) for x in sys.version_info[:2]))")
PYTHONPATH=./build/python/lib python ./build/python/scripts-${PYTHON_VERSION}/netron $@