game-and-watch-backup/1_sanity_check.sh

29 lines
850 B
Bash
Raw Normal View History

2020-11-29 10:58:55 +00:00
#!/bin/bash
2020-12-02 04:14:00 +00:00
source config.sh placeHolder
2020-11-29 10:58:55 +00:00
echo "Running sanity checks..."
2020-12-02 04:14:00 +00:00
if ! ${OPENOCD} -v >/dev/null 2>&1; then
2020-11-29 10:58:55 +00:00
echo "OpenOCD does not seem to be working. Please validate that you have it installed correctly!"
exit 1
fi
2020-12-02 04:14:00 +00:00
if [[ "${OPENOCD_VERSION}" == "0.10.0" ]]; then
echo "You seem to be using a vanilla version of openocd."
echo "In case you see the following error: "
echo " openocd/interface_stlink.cfg:1: Error: Can't find interface/stlink.cfg"
echo "Update your openocd version."
fi
2020-11-29 10:58:55 +00:00
if ! /usr/bin/env python3 -V >/dev/null 2>&1; then
echo "Could not run python3. Please validate that you have it installed correctly!"
exit 1
fi
if ! arm-none-eabi-objdump -v >/dev/null 2>&1; then
echo "Could not find arm-none-eabi-objdump. Please validate that it's installed and in PATH."
exit 1
fi
2020-12-02 04:14:00 +00:00
echo "Looks good!"