mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
Tools:nuttx_defconf_tool upstream has CONFIG_START_YEAR etal
Re insetion of CONFIG_START_{YEAR|NONTH|DAY} is not needed as
CONFIG_START_{YEAR|NONTH|DAY} have been defined always in
upstream NuttX
This commit is contained in:
committed by
Daniel Agar
parent
1991c27749
commit
86c52e2ecf
@@ -1,5 +1,7 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
|
FIXDATE=n
|
||||||
|
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Usage: $0 <path to defconfig>"
|
echo "Usage: $0 <path to defconfig>"
|
||||||
@@ -31,8 +33,8 @@ echo "Fix up Board Selection"
|
|||||||
sed -i -e "/$lead/,/$tail/{ /$lead/{p; r $chunk
|
sed -i -e "/$lead/,/$tail/{ /$lead/{p; r $chunk
|
||||||
}; /$tail/p; d }" $defconf
|
}; /$tail/p; d }" $defconf
|
||||||
|
|
||||||
|
if [ "$FIXDATE" == "y" ] ; then
|
||||||
if grep --quiet CONFIG_START_YEAR $lastconf ; then
|
if grep --quiet CONFIG_START_YEAR $lastconf ; then
|
||||||
lead='^CONFIG_START_YEAR='
|
lead='^CONFIG_START_YEAR='
|
||||||
tail='^CONFIG_START_DAY='
|
tail='^CONFIG_START_DAY='
|
||||||
cat $lastconf | sed -n "/$lead/,/$tail/p" > $chunk
|
cat $lastconf | sed -n "/$lead/,/$tail/p" > $chunk
|
||||||
@@ -40,9 +42,9 @@ if grep --quiet CONFIG_START_YEAR $lastconf ; then
|
|||||||
echo "Fix up Clocks and Timers"
|
echo "Fix up Clocks and Timers"
|
||||||
sed -i -e "/$lead/{N;{r $chunk
|
sed -i -e "/$lead/{N;{r $chunk
|
||||||
}}" $defconf
|
}}" $defconf
|
||||||
else
|
else
|
||||||
echo not found
|
echo not found
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm $lastconf
|
rm $lastconf
|
||||||
rm $chunk
|
rm $chunk
|
||||||
Reference in New Issue
Block a user