forked from rusefi/rusefi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen_config.sh
executable file
·31 lines (25 loc) · 941 Bytes
/
gen_config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
echo "This script reads rusefi_config.txt and produces firmware persistent configuration headers"
echo "The storage section of rusefi.ini is updated as well"
rm -f gen_config.log
rm -f gen_config_board.log
cd ../java_tools
./gradlew :config_definition:shadowJar
cd ../firmware
genConfig ()
{
source config/boards/common_script_read_meta_env.inc $1 >/dev/null
if [ -n "$CUSTOM_GEN_CONFIG" ]; then
bash $CUSTOM_GEN_CONFIG
else
bash gen_signature.sh ${SHORT_BOARD_NAME}
[ $? -eq 0 ] || { echo "ERROR generating signature for $1"; exit 1; }
bash gen_config_board.sh $BOARD_DIR $SHORT_BOARD_NAME
[ $? -eq 0 ] || { echo "ERROR generating configs for $1"; exit 1; }
bash bin/gen_image_board.sh $BOARD_DIR $SHORT_BOARD_NAME
[ $? -eq 0 ] || { echo "ERROR generating images for $1"; exit 1; }
fi
}
find config/boards -name "meta-info*.env" -print0 | while IFS= read -r -d '' f; do
echo -n "$(genConfig $f)"
done