mirror of
https://github.com/LIV2/pistorm.git
synced 2025-12-06 07:02:48 +00:00
nprog now checks if emulator is running and gives a much clearer success / fail with a log file for the more verbose output. Also buptest now won't run if emulator is running.
16 lines
327 B
Bash
Executable File
16 lines
327 B
Bash
Executable File
if pgrep -x "emulator" > /dev/null
|
|
then
|
|
echo "PiStorm emulator is running, please stop it first"
|
|
exit 1
|
|
fi
|
|
echo "Flashing..."
|
|
sudo openocd -f ./nprog/68new.cfg > nprog_log.txt 2>&1
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "Flashing failed, please see nprog_log.txt for details"
|
|
exit 1
|
|
else
|
|
echo "Flashing successful!"
|
|
fi
|
|
|