OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # Runs doxygen and stores its results in the skia-autogen repo, so that they | 3 # Runs doxygen and stores its results in the skia-autogen repo, so that they |
4 # can be browsed at http://skia-autogen.googlecode.com/svn/docs/html/index.html | 4 # can be browsed at http://skia-autogen.googlecode.com/svn/docs/html/index.html |
5 # | 5 # |
6 # The DOXYGEN_TEMPDIR env variable is the working directory within which we will | 6 # The DOXYGEN_TEMPDIR env variable is the working directory within which we will |
7 # check out the code, generate documentation, and store the doxygen log | 7 # check out the code, generate documentation, and store the doxygen log |
8 # (by default, /tmp/skia-doxygen). The DOXYGEN_COMMIT env variable determines | 8 # (by default, /tmp/skia-doxygen). The DOXYGEN_COMMIT env variable determines |
9 # whether docs should be commited (true by default). | 9 # whether docs should be commited (true by default). |
10 # | 10 # |
(...skipping 13 matching lines...) Expand all Loading... |
24 } | 24 } |
25 | 25 |
26 # Prepare a temporary dir and check out Skia trunk and docs. | 26 # Prepare a temporary dir and check out Skia trunk and docs. |
27 cd | 27 cd |
28 DOXYGEN_TEMPDIR=${DOXYGEN_TEMPDIR:-/tmp/skia-doxygen} | 28 DOXYGEN_TEMPDIR=${DOXYGEN_TEMPDIR:-/tmp/skia-doxygen} |
29 DOXYGEN_COMMIT=${DOXYGEN_COMMIT:-true} | 29 DOXYGEN_COMMIT=${DOXYGEN_COMMIT:-true} |
30 | 30 |
31 mkdir -p $DOXYGEN_TEMPDIR | 31 mkdir -p $DOXYGEN_TEMPDIR |
32 cd $DOXYGEN_TEMPDIR | 32 cd $DOXYGEN_TEMPDIR |
33 | 33 |
34 if [ -d "trunk" ]; then | 34 if [ -d "skia" ]; then |
35 svn update --accept theirs-full trunk | 35 pushd skia |
| 36 git pull |
| 37 git checkout origin/master |
| 38 popd |
36 else | 39 else |
37 svn checkout http://skia.googlecode.com/svn/trunk # read-only | 40 git clone https://skia.googlesource.com/skia.git |
38 fi | 41 fi |
39 if [ -d "docs" ]; then | 42 if [ -d "docs" ]; then |
40 svn update --accept theirs-full docs | 43 svn update --accept theirs-full docs |
41 svn info docs | 44 svn info docs |
42 ret_code=$? | 45 ret_code=$? |
43 if [ $ret_code != 0 ]; then | 46 if [ $ret_code != 0 ]; then |
44 # This is not a valid SVN checkout. | 47 # This is not a valid SVN checkout. |
45 rm -rf docs | 48 rm -rf docs |
46 check_out_docs | 49 check_out_docs |
47 fi | 50 fi |
48 else | 51 else |
49 check_out_docs | 52 check_out_docs |
50 fi | 53 fi |
51 | 54 |
52 if [ ! -f "docs/static_footer.txt" ]; then | 55 if [ ! -f "docs/static_footer.txt" ]; then |
53 cp trunk/tools/doxygen_footer.txt docs/static_footer.txt | 56 cp skia/tools/doxygen_footer.txt docs/static_footer.txt |
54 fi | 57 fi |
55 | 58 |
56 # Run Doxygen. | 59 # Run Doxygen. |
57 cd trunk | 60 cd skia |
58 doxygen Doxyfile | 61 doxygen Doxyfile |
59 ret_code=$? | 62 ret_code=$? |
60 if [ $ret_code != 0 ]; then | 63 if [ $ret_code != 0 ]; then |
61 echo "Error while executing Doxygen command" | 64 echo "Error while executing Doxygen command" |
62 exit $ret_code | 65 exit $ret_code |
63 fi | 66 fi |
64 | 67 |
65 cd ../docs | 68 cd ../docs |
66 | 69 |
67 # Add any newly created files to Subversion. | 70 # Add any newly created files to Subversion. |
(...skipping 29 matching lines...) Expand all Loading... |
97 find . -name '*.png' -exec svn propset svn:mime-type image/png '{}' \; | 100 find . -name '*.png' -exec svn propset svn:mime-type image/png '{}' \; |
98 | 101 |
99 # Output files with documentation updates. | 102 # Output files with documentation updates. |
100 echo -e "\n\nThe following are the documentation updates:" | 103 echo -e "\n\nThe following are the documentation updates:" |
101 echo $MODFILES | 104 echo $MODFILES |
102 | 105 |
103 if $DOXYGEN_COMMIT ; then | 106 if $DOXYGEN_COMMIT ; then |
104 # Commit the updated docs to the subversion repo. | 107 # Commit the updated docs to the subversion repo. |
105 svn commit --message 'commit doxygen-generated documentation' | 108 svn commit --message 'commit doxygen-generated documentation' |
106 fi | 109 fi |
OLD | NEW |