Skip to content

Commit 9dd309d

Browse files
unicornxmysterywolf
authored andcommitted
doxygen: support running from the root directory
Previously, you had to enter the documentation directory before executing the run.sh script, which was not very convenient during development, especially when you needed to execute other commands in the source code root directory at the same time, such as git commands. Now you can directly run script in the source code root directory as below: ```shell $ cd $RTT $ ./documentation/run.sh ``` No need to switch the working path any more after entering the source code root directory. Signed-off-by: Chen Wang <[email protected]>
1 parent 4e5f95e commit 9dd309d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

documentation/run.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
#!/bin/bash
22

3-
rm -rf ./html
3+
RTT_PATH=$(realpath $(dirname $0)/..)
4+
RTT_DOC_PATH=$RTT_PATH/documentation
45

5-
doxygen
6+
rm -rf $RTT_DOC_PATH/html
7+
8+
cd $RTT_DOC_PATH
9+
doxygen ./Doxyfile
610
if [ $? -ne 0 ]; then
711
echo ""
812
echo "OOPS: Something error/warning occurred during Doxygen building, please check it out!"
913
echo ""
1014
exit 1
1115
fi
1216

13-
pushd html
17+
pushd $RTT_DOC_PATH/html
1418
python3 -m http.server

0 commit comments

Comments
 (0)