rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
config
boards
common_script_read_meta_env.inc
Go to the documentation of this file.
1
#!/bin/bash
2
3
# this script is supposed to be executed from within 'firmware' folder
4
5
if
[ -z
"$1"
]; then
6
echo
"Read meta.env: The file path was not given as a parameter!"
7
exit -3
8
fi
9
10
BOARD_META_PATH=./$1
11
BOARD_META_DIR=${BOARD_META_PATH%
/*}
12
export BOARD_DIR=${BOARD_DIR:-$BOARD_META_DIR}
13
14
if [ ! -f ${BOARD_META_PATH} ]; then
15
echo "Read $BOARD_META_PATH: The file was not found!"
16
exit -4
17
fi
18
19
if [ ! -f ${BOARD_DIR}/board.mk ]; then
20
echo "WARNING! board.mk not found @ ${BOARD_DIR}..."
21
fi
22
23
echo "[META] Reading meta env from ${BOARD_META_PATH}"
24
25
VARS=$(grep "=" "$BOARD_META_PATH")
26
27
while IFS= read -r L; do
28
# get the key and delete all spaces
29
K=$(echo "$L" | cut -d '=' -f "-1" | tr -d ' ')
30
# get the value and delete any leading space
31
V=$(echo "$L" | cut -d '=' -f "2-" | awk '{$1=$1};1')
32
# put them together, closing the value in quotes
33
export $K="$V"
34
done <<< "$VARS"
35
36
if [ -z "$BUNDLE_NAME" ]; then
37
BUNDLE_NAME=$(echo "$BOARD_META_PATH" | sed -n 's/.*meta-info-\(.*\)\.env/\1/p')
38
if [ -z "$BUNDLE_NAME" ]; then
39
export BUNDLE_NAME="$SHORT_BOARD_NAME"
40
else
41
export BUNDLE_NAME
42
fi
43
fi
44
45
echo "[META] PROJECT_BOARD=${PROJECT_BOARD}"
46
echo "[META] PROJECT_CPU=${PROJECT_CPU}"
47
echo "[META] POST_BUILD_SCRIPT=${POST_BUILD_SCRIPT}"
48
echo "[META] BOARD_DIR=${BOARD_DIR}"
49
echo "[META] USE_OPENBLT=${USE_OPENBLT}"
echo
static void echo(int value)
This is just a test function.
Definition
eficonsole.cpp:223
Generated on Sat Sep 27 2025 00:10:04 for rusEFI by
1.9.8