Skip to content

Commit 940cbce

Browse files
committed
svn->git in doxygen docs (was about time!)
1 parent 5a13f08 commit 940cbce

File tree

2 files changed

+67
-21
lines changed

2 files changed

+67
-21
lines changed

doc/html/changelog.html

Lines changed: 35 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build_docs.sh

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ emptyARGS=1
1919
errARGS=0
2020

2121
while getopts 'chrlwsdo' OPTION
22-
do
22+
do
2323
case "$OPTION" in
2424
c) outCHM="YES"
2525
genHTML="YES"
2626
MRPT_USE_SEARCHENGINE="NO"
27-
emptyARGS=0
27+
emptyARGS=0
2828
;;
2929
h) outHTML="YES"
3030
genHTML="YES"
3131
emptyARGS=0
3232
;;
3333
r) genRTF="YES"
34-
emptyARGS=0
34+
emptyARGS=0
3535
;;
3636
l) genLATEX="YES"
37-
emptyARGS=0
37+
emptyARGS=0
3838
;;
3939
w) includeCounter="YES"
4040
;;
@@ -61,7 +61,7 @@ then
6161
exit 1
6262
fi
6363

64-
# List of directories with header files (.h) and individual files to
64+
# List of directories with header files (.h) and individual files to
6565
# generate doc from.
6666
# Paths relative to "$MRPT_ROOT"
6767
# -------------------------------------------------------------------
@@ -95,13 +95,13 @@ fi
9595
# "Linux"
9696
# other...
9797
#
98-
# We will directly execute HHC.exe only in the case of CYGWIN, or
98+
# We will directly execute HHC.exe only in the case of CYGWIN, or
9999
# through "wine" otherwise.
100100
#-------------------------------------------------------------------
101101
SYS_NAME=`uname -s`
102102
MATCH_COUNT=`expr index "$SYS_NAME" 'GW'`
103103

104-
echo
104+
echo
105105
if [ $MATCH_COUNT -eq 0 ]
106106
then
107107
SYSTEM_TYPE="Linux"
@@ -130,7 +130,9 @@ echo "--------------------------------------------------------------------"
130130
sleep 2
131131

132132
# Obtain the SVN number:
133-
if [ "$skipSVN" = "NO" ]
133+
MRPT_SVN_NUMBER=""
134+
135+
if [ -d .svn ]
134136
then
135137
printf "Obtaining SVN number (This may take a *while* the first time, be patient)...\n"
136138
printf "Running svnversion..."
@@ -145,8 +147,23 @@ then
145147
MRPT_SVN_NUMBER = ""
146148
fi
147149
printf "OK (%s)\n" $MRPT_SVN_NUMBER
148-
else
149-
MRPT_SVN_NUMBER=""
150+
fi
151+
152+
if [ -d .git ]
153+
then
154+
printf "Obtaining Git commit id...\n"
155+
printf "Running..."
156+
MRPT_SVN_NUMBER="Git: `git log --pretty=format:'%h %cd' -n 1`"
157+
158+
if [ $? -ne 0 ]
159+
then
160+
#echo "ERROR: svnversion returns an error code! Is SVN installed in the system???"
161+
#echo " You can use the argument -s to skip SVN number extraction. See README."
162+
#exit 1
163+
echo "WARNING: git returns an error code! Is git installed in the system???"
164+
MRPT_SVN_NUMBER = ""
165+
fi
166+
printf "OK (%s)\n" "$MRPT_SVN_NUMBER"
150167
fi
151168

152169
# Build the complete library name:
@@ -200,7 +217,7 @@ mkdir doc/chm
200217
CHM_FILENAME="libMRPT-$MRPT_VERSION_STR.chm"
201218

202219
# Create the DOXYGEN scripts by replacing constant values:
203-
# We parse the file doxygen_project.txt.in into the
220+
# We parse the file doxygen_project.txt.in into the
204221
# file doxygen_project.txt, by replacing:
205222
#
206223
# $MRPT_COMPLETE_NAME
@@ -219,11 +236,11 @@ printf "Generating the html footer..."
219236

220237
if [ "$includeCounter" = "YES" ]
221238
then
222-
WEB_COUNTER_STR='<script type="text/javascript"> var sc_project=2835288; var sc_invisible=0; var sc_partition=28; var sc_security="862cd600";</script> <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript> <div class="statcounter"><img class="statcounter" src="http://c29.statcounter.com/2835288/0/862cd600/0/" alt="free html hit counter" ></div></noscript>'
223-
239+
WEB_COUNTER_STR='<script type="text/javascript"> var sc_project=2835288; var sc_invisible=0; var sc_partition=28; var sc_security="862cd600";</script> <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript> <div class="statcounter"><img class="statcounter" src="http://c29.statcounter.com/2835288/0/862cd600/0/" alt="free html hit counter" ></div></noscript>'
240+
224241
# Note: The trailing "$" is to allow escaping the single quotes like in ANSI C:
225242
GOOGLE_ANALYTICS_STR=$'<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E")); </script> <script type="text/javascript"> try{ var pageTracker = _gat._getTracker("UA-21128561-2"); pageTracker._trackPageview(); } catch(err) {} </script>'
226-
243+
227244
SOURCEFORGE_LOGO="<small>Hosted on:</small><br><a href=\"http://sourceforge.net\"><img src=\"http://sflogo.sourceforge.net/sflogo.php?group_id=205280&amp;type=1\" width=\"88\" height=\"31\" border=\"0\" alt=\"SourceForge.net Logo\" ></a>"
228245
else
229246
WEB_COUNTER_STR=""
@@ -253,7 +270,7 @@ then
253270
cd html
254271
mv -f $FILES_TO_SAVE ../
255272
cd ..
256-
273+
257274
# Remove all:
258275
rm html/*.html > /dev/null 2>&1
259276
rm html/*.png > /dev/null 2>&1
@@ -266,5 +283,3 @@ cd ..
266283

267284
# Keep a valid command at the end to assure that ERRORLEVEL is "0" when executing the script in Windows
268285
printf "Done!\n\n"
269-
270-

0 commit comments

Comments
 (0)