summaryrefslogtreecommitdiff
path: root/nuttx/tools/mkconfigvars.sh
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-04-23 08:38:49 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-04-23 08:38:49 -0600
commit3b3d044646a77e2cd10442586a37da4fe1fe3918 (patch)
treece88f8cd3cb8daef34dbe6bd3969f813625e1822 /nuttx/tools/mkconfigvars.sh
parent886e0bd14191864a39624a08595a19357c3fb2f5 (diff)
downloadnuttx-3b3d044646a77e2cd10442586a37da4fe1fe3918.tar.gz
nuttx-3b3d044646a77e2cd10442586a37da4fe1fe3918.tar.bz2
nuttx-3b3d044646a77e2cd10442586a37da4fe1fe3918.zip
Keep a backup of the previous NuttXConfigVariables.html file
Diffstat (limited to 'nuttx/tools/mkconfigvars.sh')
-rwxr-xr-xnuttx/tools/mkconfigvars.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/nuttx/tools/mkconfigvars.sh b/nuttx/tools/mkconfigvars.sh
index 49c3442b4..7bccefd65 100755
--- a/nuttx/tools/mkconfigvars.sh
+++ b/nuttx/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}