xref: /aosp_15_r20/external/eigen/scripts/eigen_gen_docs (revision bf2c37156dfe67e5dfebd6d394bad8b2ab5804d4)
1*bf2c3715SXin Li#!/bin/sh
2*bf2c3715SXin Li
3*bf2c3715SXin Li# configuration
4*bf2c3715SXin Li# You should call this script with USER set as you want, else some default
5*bf2c3715SXin Li# will be used
6*bf2c3715SXin LiUSER=${USER:-'orzel'}
7*bf2c3715SXin LiUPLOAD_DIR=dox-devel
8*bf2c3715SXin Li
9*bf2c3715SXin Li#ulimit -v 1024000
10*bf2c3715SXin Li
11*bf2c3715SXin Li# step 1 : build
12*bf2c3715SXin Lirm build/doc/html -Rf
13*bf2c3715SXin Limkdir build -p
14*bf2c3715SXin Li(cd build && cmake .. && make doc) || { echo "make failed"; exit 1; }
15*bf2c3715SXin Li
16*bf2c3715SXin Li#step 2 : upload
17*bf2c3715SXin Li# (the '/' at the end of path is very important, see rsync documentation)
18*bf2c3715SXin Lirsync -az --no-p --delete build/doc/html/ $USER@ssh.tuxfamily.org:eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR/ || { echo "upload failed"; exit 1; }
19*bf2c3715SXin Li
20*bf2c3715SXin Li#step 3 : fix the perm
21*bf2c3715SXin Lissh $USER@ssh.tuxfamily.org "chmod -R g+w /home/eigen/eigen.tuxfamily.org-web/htdocs/$UPLOAD_DIR" || { echo "perm failed"; exit 1; }
22*bf2c3715SXin Li
23*bf2c3715SXin Liecho "Uploaded successfully"
24*bf2c3715SXin Li
25