From 86c52e2ecf579b446f7da77ec77b853bd622ca72 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 23 Aug 2017 15:12:13 -1000 Subject: [PATCH] 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 --- Tools/nuttx_defconf_tool.sh | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Tools/nuttx_defconf_tool.sh b/Tools/nuttx_defconf_tool.sh index 125299712e..b739dd07f8 100755 --- a/Tools/nuttx_defconf_tool.sh +++ b/Tools/nuttx_defconf_tool.sh @@ -1,5 +1,7 @@ #! /bin/bash +FIXDATE=n + if [ $# -eq 0 ] then echo "Usage: $0 " @@ -31,18 +33,18 @@ echo "Fix up Board Selection" sed -i -e "/$lead/,/$tail/{ /$lead/{p; r $chunk }; /$tail/p; d }" $defconf - -if grep --quiet CONFIG_START_YEAR $lastconf ; then - lead='^CONFIG_START_YEAR=' - tail='^CONFIG_START_DAY=' - cat $lastconf | sed -n "/$lead/,/$tail/p" > $chunk - lead='^# Clocks and Timers$' - echo "Fix up Clocks and Timers" - sed -i -e "/$lead/{N;{r $chunk - }}" $defconf -else - echo not found +if [ "$FIXDATE" == "y" ] ; then + if grep --quiet CONFIG_START_YEAR $lastconf ; then + lead='^CONFIG_START_YEAR=' + tail='^CONFIG_START_DAY=' + cat $lastconf | sed -n "/$lead/,/$tail/p" > $chunk + lead='^# Clocks and Timers$' + echo "Fix up Clocks and Timers" + sed -i -e "/$lead/{N;{r $chunk + }}" $defconf + else + echo not found + fi fi - rm $lastconf rm $chunk \ No newline at end of file