From c529917c0923cc31fe095f094fec978ae40061bc Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 23 Apr 2013 08:38:49 -0600 Subject: [PATCH] Keep a backup of the previous NuttXConfigVariables.html file --- tools/mkconfigvars.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/mkconfigvars.sh b/tools/mkconfigvars.sh index 49c3442b4f2..7bccefd6532 100755 --- a/tools/mkconfigvars.sh +++ b/tools/mkconfigvars.sh @@ -41,6 +41,7 @@ KCONFIG2HTML2=tools/kconfig2html.exe KCONFIG2MAKEFILE=Makefile.host KCONFIG2MAKEDIR=tools HTMLFILE=Documentation/NuttXConfigVariables.html +BKUPFILE=Documentation/NuttXConfigVariables.bkp # A version argument may be provided @@ -96,6 +97,14 @@ else fi fi +# Keep a backup of the previous HTML file. This is usefully primarily +# for testing the effects of changes. + +if [ -e "${HTMLFILE}" ]; then + rm -f ${BKUPFILE} || { echo "ERROR: Failed to remove ${BKUPFILE}" ; exit 1 ; } + mv ${HTMLFILE} ${BKUPFILE} || { echo "ERROR: Failed to move ${HTMLFILE}" ; exit 1 ; } +fi + # Now re-create the configuration variable document ${KCONFIG2HTML} -a "${APPSDIR}" -o ${HTMLFILE}