aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-09 20:53:03 +0000
committerGravatar rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-09 20:53:03 +0000
commitbcf0c5229c047e8c8ba993faf0ca14c30a3d4c51 (patch)
tree48eef922099e591c848221ebe1f71e8edc06af63 /tools
parent7dcae67cae277549accdd38d0496b72d00151239 (diff)
* Adding arguments to specify the working directory and whether the script should try to commit at the end.
* Redirecting doxygen output to a last_run_output.txt file. * Maintaining backwards compatibility. Context- This CL is a preparatory CL for the housekeeping slave. The slave will use this script to update Doxygen docs. The script will not be used to commit and instead the slave will call AddMergeIntoSvn to commit. Review URL: https://codereview.appspot.com/6348076 git-svn-id: http://skia.googlecode.com/svn/trunk@4495 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rwxr-xr-xtools/update-doxygen.sh30
1 files changed, 24 insertions, 6 deletions
diff --git a/tools/update-doxygen.sh b/tools/update-doxygen.sh
index c95c2d0366..54633e3f6a 100755
--- a/tools/update-doxygen.sh
+++ b/tools/update-doxygen.sh
@@ -2,13 +2,25 @@
#
# Runs doxygen and stores its results in the skia-autogen repo, so that they
# can be browsed at http://skia-autogen.googlecode.com/svn/docs/html/index.html
+#
+# The DOXYGEN_TEMPDIR env variable is the working directory within which we will
+# check out the code, generate documentation, and store the doxygen log
+# (by default, /tmp/skia-doxygen). The DOXYGEN_COMMIT env variable determines
+# whether docs should be commited (true by default).
+#
+# Sample Usage:
+# export DOXYGEN_TEMPDIR=/tmp/doxygen
+# export DOXYGEN_COMMIT=false
+# bash update-doxygen.sh
# Prepare a temporary dir and check out Skia trunk and docs.
cd
-TEMPDIR=/tmp/skia-doxygen
-rm -rf $TEMPDIR
-mkdir -p $TEMPDIR
-cd $TEMPDIR
+DOXYGEN_TEMPDIR=${DOXYGEN_TEMPDIR:-/tmp/skia-doxygen}
+DOXYGEN_COMMIT=${DOXYGEN_COMMIT:-true}
+
+rm -rf $DOXYGEN_TEMPDIR
+mkdir -p $DOXYGEN_TEMPDIR
+cd $DOXYGEN_TEMPDIR
svn checkout http://skia.googlecode.com/svn/trunk # read-only
svn checkout https://skia-autogen.googlecode.com/svn/docs # writeable
@@ -49,5 +61,11 @@ find . -name '*.js' -exec svn propset svn:mime-type text/javascript '{}' \;
find . -name '*.gif' -exec svn propset svn:mime-type image/gif '{}' \;
find . -name '*.png' -exec svn propset svn:mime-type image/png '{}' \;
-# Commit the updated docs to the subversion repo.
-svn commit --message 'commit doxygen-generated documentation'
+# Output files with documentation updates.
+echo -e "\n\nThe following are the documentation updates:"
+echo $MODFILES
+
+if $DOXYGEN_COMMIT ; then
+ # Commit the updated docs to the subversion repo.
+ svn commit --message 'commit doxygen-generated documentation'
+fi