mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
Tools: correct firmware-version.txt file creation
This commit is contained in:
parent
90979b6db5
commit
729765bd30
@ -166,12 +166,13 @@ addfwversion() {
|
|||||||
destdir="$1"
|
destdir="$1"
|
||||||
src="$2"
|
src="$2"
|
||||||
git log -1 > "$destdir/git-version.txt"
|
git log -1 > "$destdir/git-version.txt"
|
||||||
[ -f "$src/version.h" ] && {
|
versionfile="$src/version.h"
|
||||||
|
[ -f $versionfile ] && {
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
version=$(grep 'define.THISFIRMWARE' version.h 2> /dev/null | cut -d'"' -f2)
|
version=$(grep 'define.THISFIRMWARE' $versionfile 2> /dev/null | cut -d'"' -f2)
|
||||||
echo >> "$destdir/git-version.txt"
|
echo >> "$destdir/git-version.txt"
|
||||||
echo "APMVERSION: $version" >> "$destdir/git-version.txt"
|
echo "APMVERSION: $version" >> "$destdir/git-version.txt"
|
||||||
python $BASEDIR/Tools/PrintVersion.py >"$destdir/firmware-version.txt"
|
python $BASEDIR/Tools/PrintVersion.py $src >"$destdir/firmware-version.txt"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user