Improvements to script to regenerate doxygen docs.
- The default is actually "html" not "all", so fix comment to match reality. - A shell script is run in a sub-shell, and the parent's current directory won't be affected, so it's pointless (and confusing) to try to restore it at the end of the script. - Remove trailing ";" from "export FOO=bar;" - it's not required, though is valid (it means every "export" is followed by an empty statement). - After adjusting doxygen.log, simply use "mv" to replace the original, rather than "cat" then "rm". Fixes #17001
This commit is contained in:
@@ -9,16 +9,14 @@
|
|||||||
# ./regen.sh [html|chm|xml|latex|all]
|
# ./regen.sh [html|chm|xml|latex|all]
|
||||||
#
|
#
|
||||||
# Pass "x" to regen only the X output format and "all" to regen them all.
|
# Pass "x" to regen only the X output format and "all" to regen them all.
|
||||||
# If no arguments are passed all formats are regenerated
|
# If no arguments are passed, HTML is regenerated (just like passing "html").
|
||||||
# (just like passing "all").
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# remember current folder and then cd to the docs/doxygen one
|
# cd to the directory this script is in
|
||||||
me=$(basename $0)
|
me=$(basename $0)
|
||||||
path=${0%%/$me} # path from which the script has been launched
|
path=${0%%/$me} # path from which the script has been launched
|
||||||
current=$(pwd)
|
cd "$path"
|
||||||
cd $path
|
|
||||||
if [[ -z "$WXWIDGETS" ]]; then
|
if [[ -z "$WXWIDGETS" ]]; then
|
||||||
# Notice the use of -P to ensure we get the canonical path even if there
|
# Notice the use of -P to ensure we get the canonical path even if there
|
||||||
# are symlinks in the current path. This is important because Doxygen
|
# are symlinks in the current path. This is important because Doxygen
|
||||||
@@ -59,48 +57,48 @@ mkdir -p out/html/generic
|
|||||||
cp images/generic/*png out/html/generic
|
cp images/generic/*png out/html/generic
|
||||||
|
|
||||||
# Defaults for settings controlled by this script
|
# Defaults for settings controlled by this script
|
||||||
export GENERATE_DOCSET="NO";
|
export GENERATE_DOCSET="NO"
|
||||||
export GENERATE_HTML="NO";
|
export GENERATE_HTML="NO"
|
||||||
export GENERATE_HTMLHELP="NO";
|
export GENERATE_HTMLHELP="NO"
|
||||||
export GENERATE_LATEX="NO";
|
export GENERATE_LATEX="NO"
|
||||||
export GENERATE_QHP="NO";
|
export GENERATE_QHP="NO"
|
||||||
export GENERATE_XML="NO";
|
export GENERATE_XML="NO"
|
||||||
export SEARCHENGINE="NO";
|
export SEARCHENGINE="NO"
|
||||||
export SERVER_BASED_SEARCH="NO";
|
export SERVER_BASED_SEARCH="NO"
|
||||||
|
|
||||||
# Which format should we generate during this run?
|
# Which format should we generate during this run?
|
||||||
case "$1" in
|
case "$1" in
|
||||||
all) # All *main* formats, not all formats, here for backwards compat.
|
all) # All *main* formats, not all formats, here for backwards compat.
|
||||||
export GENERATE_HTML="YES";
|
export GENERATE_HTML="YES"
|
||||||
export GENERATE_HTMLHELP="YES";
|
export GENERATE_HTMLHELP="YES"
|
||||||
export GENERATE_XML="YES";
|
export GENERATE_XML="YES"
|
||||||
;;
|
;;
|
||||||
chm)
|
chm)
|
||||||
export GENERATE_HTML="YES";
|
export GENERATE_HTML="YES"
|
||||||
export GENERATE_HTMLHELP="YES";
|
export GENERATE_HTMLHELP="YES"
|
||||||
;;
|
;;
|
||||||
docset)
|
docset)
|
||||||
export GENERATE_DOCSET="YES";
|
export GENERATE_DOCSET="YES"
|
||||||
export GENERATE_HTML="YES";
|
export GENERATE_HTML="YES"
|
||||||
;;
|
;;
|
||||||
latex)
|
latex)
|
||||||
export GENERATE_LATEX="YES";
|
export GENERATE_LATEX="YES"
|
||||||
;;
|
;;
|
||||||
php) # HTML, but with PHP Search Engine
|
php) # HTML, but with PHP Search Engine
|
||||||
export GENERATE_HTML="YES";
|
export GENERATE_HTML="YES"
|
||||||
export SEARCHENGINE="YES";
|
export SEARCHENGINE="YES"
|
||||||
export SERVER_BASED_SEARCH="YES";
|
export SERVER_BASED_SEARCH="YES"
|
||||||
;;
|
;;
|
||||||
qch)
|
qch)
|
||||||
export GENERATE_HTML="YES";
|
export GENERATE_HTML="YES"
|
||||||
export GENERATE_QHP="YES";
|
export GENERATE_QHP="YES"
|
||||||
;;
|
;;
|
||||||
xml)
|
xml)
|
||||||
export GENERATE_XML="YES";
|
export GENERATE_XML="YES"
|
||||||
;;
|
;;
|
||||||
*) # Default to HTML only
|
*) # Default to HTML only
|
||||||
export GENERATE_HTML="YES";
|
export GENERATE_HTML="YES"
|
||||||
export SEARCHENGINE="YES";
|
export SEARCHENGINE="YES"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -201,8 +199,4 @@ fi
|
|||||||
currpath=`pwd`/
|
currpath=`pwd`/
|
||||||
interfacepath=`cd ../../interface && pwd`/
|
interfacepath=`cd ../../interface && pwd`/
|
||||||
cat doxygen.log | sed -e "s|$currpath||g" -e "s|$interfacepath||g" > temp
|
cat doxygen.log | sed -e "s|$currpath||g" -e "s|$interfacepath||g" > temp
|
||||||
cat temp > doxygen.log
|
mv temp doxygen.log
|
||||||
rm temp
|
|
||||||
|
|
||||||
# return to the original folder from which this script was launched
|
|
||||||
cd $current
|
|
||||||
|
Reference in New Issue
Block a user