aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-08-14 19:07:01 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-08-14 19:07:01 -0400
commit62748a0963efa37a1e5f9b4fe2132403f16bc8fd (patch)
treed9c0e3d739b3999ff7e83b3d314b2ae9ebbd2458 /scripts
parent8372bd12bde594af997977c1387bb4d2f8972ceb (diff)
new script to generate and upload the docs for a given branch
needs cleanup by a better shell scripter!!
Diffstat (limited to 'scripts')
-rw-r--r--scripts/eigen_gen_docs63
1 files changed, 63 insertions, 0 deletions
diff --git a/scripts/eigen_gen_docs b/scripts/eigen_gen_docs
new file mode 100644
index 000000000..bc514b5a8
--- /dev/null
+++ b/scripts/eigen_gen_docs
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+# todo: check that at most one argument was passed.
+
+if [ $# -eq 1 ]
+then
+ branch=$1
+ destination=dox-$1
+elif [ $# -eq 0 ]
+then
+ branch=default
+ destination=dox-devel
+fi
+
+
+echo branch: $branch
+echo destination: $destination
+
+# todo: push the `pwd` to restore it at the end
+
+rm -rf eigen_gen_docs_work_directory
+mkdir eigen_gen_docs_work_directory
+
+# todo: is it really good practice to cd all the time?
+
+hg archive -r $branch eigen_gen_docs_work_directory/eigen2
+
+cd eigen_gen_docs_work_directory
+
+#todo: check that the work directory was successfully created (exit if already existing) and entered
+
+mkdir build
+cd build
+cmake ../eigen2
+make -j3 doc #todo: n+1 where n = number of cpus
+
+#todo: check that make succeeded, is there a return code or something to check?
+
+#todo: check that there exists a doc subdir
+cd doc
+
+#todo: check that there exists a html subdir
+tar cfjv html.tar.bz2 html/
+
+echo "put html.tar.bz2" > sftp_batchfile
+
+echo "uploading the dox archive"
+
+sftp ssh.tuxfamily.org < sftp_batchfile
+
+echo "cd eigen/eigen.tuxfamily.org-web/htdocs
+pwd
+mv ../../../html.tar.bz2 .
+echo uncompressing the dox archive
+tar xfjv html.tar.bz2
+echo removing old dox
+rm -rf $destination
+mv html $destination
+echo giving write permissions to the group
+chmod -R g+w $destination
+" > ssh_batchfile
+
+ssh ssh.tuxfamily.org < ssh_batchfile \ No newline at end of file