unleashed-firmware/scripts/flash_core1_main_swd.sh
rusdacent 202c1d4b0e
Improved reliability of shell scripts (#699)
* Add double quotes for shell variables
* Added exit for cd command. Prevent run commands after incorrect change directory.
2021-09-13 04:44:02 +03:00

13 lines
318 B
Bash
Executable File

#!/bin/bash
set -x -e
SCRIPT_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
rm "$PROJECT_DIR"/bootloader/.obj/f*/flash || true
make -C "$PROJECT_DIR"/bootloader -j9 flash
rm "$PROJECT_DIR"/firmware/.obj/f*/flash || true
make -C "$PROJECT_DIR"/firmware -j9 flash