#!/bin/bash

set -euo pipefail

if [ "$#" -ne 1 ]; then
    echo "Please provide the time source"
    echo "  Usage: loadall.sh <EMU, GPS>"
    exit 1
fi

bazel_run //vehicle/network/config:load_nova_config -- /dev/ttyUSB0 --time_source $1
bazel_run //vehicle/network/config:load_nova_config -- /dev/ttyUSB1 --time_source $1
bazel_run //vehicle/network/config:load_nova_config -- /dev/ttyUSB2 --time_source $1
bazel_run //vehicle/network/config:load_nova_config -- /dev/ttyUSB3 --time_source $1
