forked from pypeit/PypeIt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_docs
executable file
·29 lines (23 loc) · 929 Bytes
/
update_docs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
cd doc
printf "\n\nUpdating API documentation and testing html compilation\n\n"
sleep 1
make clean ; make html
git add api
git add pypeit_par.rst
cd ../
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
nwarnings=$(wc -l "doc/sphinx_warnings.out" | awk '{print $1}')
if [ ${nwarnings} -ne 0 ]; then
printf "\n\n${RED}====================${NC}\n"
printf "${RED}Sphinx build FAILED: ${nwarnings} warnings found.${NC}\n"
printf "${RED}====================${NC}\n\n"
else
printf "\n\n${GREEN}========================${NC}\n"
printf "${GREEN}Sphinx build successful.${NC}\n"
printf "${GREEN}========================${NC}\n\n"
fi
printf "Check the modified files with:\n\n git status\n\nFix any errors/warnings in:\n\n doc/sphinx_warnings.out\n\nAdd any additional changes with:\n\n git add -u\n\nAnd commit the changes with: \n\n git commit -m 'updated docs'\n\n"
exit 0