mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-28 14:11:29 +01:00
scripts: dtc-version: support git version strings too
Building dtc from git causes the version number to start with a 'v' (e.g. v1.7.0). printf then fails to parse 'v1' as a decimal value, and prints '000700' instead of '010700'. Subsequently, the build fails, because '000700' is less than the required '010400' version. Signed-off-by: Martin Hundebøll <martin@geanix.com>
This commit is contained in:
parent
eaa9efafff
commit
f07381529b
@ -20,7 +20,7 @@ if ! which $dtc >/dev/null ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1)
|
MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1 | tr -d v)
|
||||||
MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2)
|
MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2)
|
||||||
PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1)
|
PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user