puudot/run.sh
Lauri Koskenniemi 0e5a2868b0 Introduce verbose mode and generalize output formats
Added program specific configurations in config.yaml under puudot
and added key for verbose mode. Currently verbose mode prints
'dot' information when running the program.

Refactored puudot.py and graph.py in order to allow easier
addition of output formats.
2025-12-03 20:43:05 +02:00

23 lines
434 B
Bash

#!/bin/sh
# Check if puudot.py exists
if [ ! -f "/code/puudot.py" ]; then
echo "Error: puudot.py not found in /code directory!"
exit 1
fi
# Check if config.yaml exists
if [ ! -f "/config.yaml" ]; then
echo "Error: config.yaml not found in /config directory!"
exit 1
fi
verbose=$(yq eval '.puudot.verbose' /config.yaml)
if [ "$verbose" = true ]; then
echo $(dot -v)
fi
# Run the script
python3 /code/puudot.py