5 OPTVAL=`getopt -o -b:l:du:v -n 'apidoc.publish' -- "$@"`
7 # Note the quotes around `$OPTVAL': they are essential!
10 if [ -d lustre/CVS ] ;then
11 if [ -r lustre/CVS/Tag ] ;then
12 branch=$(cut -c2- lustre/CVS/Tag)
39 label="$label$(date '+%Y.%m.%d')"
43 verbose=$(($verbose + 1))
51 echo "Internal error!"
57 if [ x$branch = x ] ;then
58 echo "No branch specified"
62 echo "Updating documentation for branch \`$branch'"
63 if [ x$label != x ] ;then
67 dst="$user@shell.lustre.sun.com:/home/www/apidoc/$branch$label"
69 opt="-rltvzp --delete"
70 sshopt="ssh -l $user -oPort=922"
71 if [ -d apidoc.api/html ] ;then
72 chmod -R a+rx apidoc.api/html
73 rsync $opt --rsh="$sshopt" apidoc.api/html $dst/api
75 if [ -d apidoc.ref/html ] ;then
76 chmod -R a+rx apidoc.ref/html
77 rsync $opt --rsh="$sshopt" apidoc.ref/html $dst/ref