Fix CPLD detection sometimes failing

CPLD detection would sometimes fail if emulator was running, so fail
with a message to stop the emulator _before_ detection. The emulator
check will remain in nprog too for those who run that directly.
This commit is contained in:
Andrew Hutchings 2021-07-03 07:20:02 +01:00
parent 10689c6c24
commit 2b1daffb81
2 changed files with 10 additions and 0 deletions

View File

@ -1,5 +1,10 @@
#!/bin/bash
set -o pipefail
if pgrep -x "emulator" > /dev/null
then
echo "PiStorm emulator is running, please stop it first"
exit 1
fi
if ! command -v openocd &> /dev/null
then
echo "openocd is not installed, please run \"sudo apt install openocd\""

View File

@ -1,5 +1,10 @@
#!/bin/bash
set -o pipefail
if pgrep -x "emulator" > /dev/null
then
echo "PiStorm emulator is running, please stop it first"
exit 1
fi
if ! command -v openocd &> /dev/null
then
echo "openocd is not installed, please run \"sudo apt install openocd\""