gen_config.sh code duplication #2451

This commit is contained in:
Andrey 2021-07-30 17:39:55 -04:00
parent d066b4ee31
commit 00b9a1349a
2 changed files with 12 additions and 6 deletions

View File

@ -6,8 +6,8 @@ echo "The storage section of rusefi.ini is updated as well"
rm -f gen_config.log
rm -f gen_config_board.log
bash gen_config_default.sh
[ $? -eq 0 ] || { echo "ERROR generating default"; exit 1; }
# todo: who is the consumer of this folder? shall we move that 'mkdir' command closer to usage?
mkdir build
#
# see also build-firmware where we compile all versions of firmware
@ -24,6 +24,12 @@ for BOARD in "f429-discovery f429-discovery" "hellen/hellen128 hellen128 rusefi_
[ $? -eq 0 ] || { echo "ERROR generating board $BOARD_NAME $BOARD_SHORT_NAME $INI"; exit 1; }
done
# default config should be generated after normal custom boards so that it would be default
# firmware/controllers/generated/rusefi_generated.h file which would be pushed into VCS
bash gen_config_default.sh
[ $? -eq 0 ] || { echo "ERROR generating default"; exit 1; }
cd config/boards/kinetis/config
bash gen_config.sh
[ $? -eq 0 ] || { echo "ERROR generating board kinetis kin"; exit 1; }

View File

@ -1,14 +1,14 @@
#!/bin/bash
# file gen_config_default.sh
mkdir build
bash gen_config_board.sh f407-discovery all rusefi.ini
exit $?
# todo gen_config.sh code duplication https://github.com/rusefi/rusefi/issues/2451
set -e
rm -f gen_config.log
rm -f gen_config_board.log
BOARDNAME=f407-discovery
SHORT_BOARDNAME=all