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 <unicorn_wang@outlook.com>
This commit is contained in:
Chen Wang
2025-02-21 17:04:02 +08:00
committed by Meco Man
parent 4e5f95e4f9
commit 9dd309df26
+7 -3
View File
@@ -1,8 +1,12 @@
#!/bin/bash #!/bin/bash
rm -rf ./html RTT_PATH=$(realpath $(dirname $0)/..)
RTT_DOC_PATH=$RTT_PATH/documentation
doxygen rm -rf $RTT_DOC_PATH/html
cd $RTT_DOC_PATH
doxygen ./Doxyfile
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "" echo ""
echo "OOPS: Something error/warning occurred during Doxygen building, please check it out!" echo "OOPS: Something error/warning occurred during Doxygen building, please check it out!"
@@ -10,5 +14,5 @@ if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
pushd html pushd $RTT_DOC_PATH/html
python3 -m http.server python3 -m http.server