summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Wang <[email protected]>2025-02-21 17:04:02 +0800
committerMeco Man <[email protected]>2025-02-21 21:58:01 -0500
commit9dd309df2698e0da3ad9ab2a0f858701f1aece6d (patch)
tree318bfdbb9dfbfd2bba05308ac32aa291da48a5cf
parent4e5f95e4f925dc93ac5d96e109e68f9c3bed2549 (diff)
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]>
-rwxr-xr-xdocumentation/run.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/documentation/run.sh b/documentation/run.sh
index 3b7d551c3c..10093505de 100755
--- a/documentation/run.sh
+++ b/documentation/run.sh
@@ -1,8 +1,12 @@
#!/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
echo ""
echo "OOPS: Something error/warning occurred during Doxygen building, please check it out!"
@@ -10,5 +14,5 @@ if [ $? -ne 0 ]; then
exit 1
fi
-pushd html
+pushd $RTT_DOC_PATH/html
python3 -m http.server \ No newline at end of file