John Wiggins 584bc40189 Set spipi to new name instead of IP address
Improved config script so the spipi config file doesn't have
to be updated with the IP address of the raspberry pi.
2022-07-27 12:20:29 -06:00

18 lines
335 B
Bash

#!/usr/bin/env bash
SPIPI=${SPIPI:-"system76@spipi.local"}
if [ ! -d "models/${MODEL}" ]
then
echo "model '${MODEL}' not found" >&2
exit 1
fi
MODEL_DIR="$(realpath "models/${MODEL}")"
if [ ! -f "${MODEL_DIR}/chip.txt" ]
then
echo "model '${MODEL}' does not have chip.txt" >&2
exit 1
fi
CHIP="$(cat "${MODEL_DIR}/chip.txt")"