| 1 | #!/bin/bash -e |
| 2 | |
| 3 | # maintainer (ask me any questions): rfree |
| 4 | |
| 5 | if [[ ! -r "Doxyfile" ]] ; then |
| 6 | echo "Error, can not read the Doxyfile - make sure to run this script from top of monero project, where the Doxyfile file is located" |
| 7 | exit 1 |
| 8 | fi |
| 9 | |
| 10 | wwwdir="$HOME/monero-www/" |
| 11 | if [[ ! -w "$wwwdir" ]] ; then |
| 12 | echo "Error, can not write into wwwdir=$wwwdir. It should be a directory readable/connected to your webserver, or a symlink to such directory" |
| 13 | exit 1 |
| 14 | fi |
| 15 | |
| 16 | if [[ ! -d "$wwwdir/doc" ]] ; then |
| 17 | echo "Creating subdirs" |
| 18 | mkdir "$wwwdir/doc" |
| 19 | fi |
| 20 | |
| 21 | echo "Generating:" |
| 22 | doxygen Doxyfile && echo "Backup previous version:" && rm -rf ~/monero-www-previous && mv "$wwwdir/doc" ~/monero-www-previous && cp -ar doc/ "$wwwdir/" && echo "Done, builded and copied to public - the doxygen docs" && echo "size:" && du -Dsh "$wwwdir/" && echo "files:" && find "$wwwdir/" | wc -l |
| 23 | |
| 24 | |
| 25 |