/[MITgcm]/mitgcm.org/scripts/bld_manual.sh
ViewVC logotype

Contents of /mitgcm.org/scripts/bld_manual.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Mon Mar 3 01:47:26 2008 UTC (16 years, 10 months ago) by jmc
Branch: MAIN
File MIME type: application/x-sh
check-in little script to build web & manual

1 #! /usr/bin/env bash
2
3 # $Header: $
4
5 #BLDDIR='/u/u0/httpd/html/build_manual'
6 #cd $BLDDIR
7 #retval=$?
8 #if test "x$retval" != x0 ; then
9 # echo "unable to cd to '$BLDDIR' => exit"
10 # exit
11 #fi
12 echo -n "-- Start '"`basename $0`"' at : " ; date
13
14 export CVSROOT=/u/gcmpack
15 #OUTDIR='/u/u0/httpd/html/r2_manual'
16 #- note: "mv" to relative path below is much faster than using full path above
17 OUTDIR='../r2_manual'
18
19 echo
20 echo " Removing previous directories..."
21 test -e old && rm -rf old
22 mkdir old
23 mv MITgcm manual mitgcm.org old
24 rm -rf old &
25
26 if test -e scratch/dev_docs ; then
27 mv scratch/dev_docs "scratch/dev_docs_"`date +%Y%m%d`"_"`date +%H%M`
28 fi
29
30 echo
31 echo "-- Download from CVS :"
32 rm -f dwn.log
33 echo -n ' MITgcm ... '
34 cvs -q co -P MITgcm > dwn.log
35 echo "=====================================" >> dwn.log
36 echo -n ', manual ... ' ;
37 cvs -q co -P manual >> dwn.log
38 echo "=====================================" >> dwn.log
39 echo -n ', mitgcm.org ...'
40 cvs -q co -P mitgcm.org >> dwn.log
41 echo -n " : done " ; date
42
43 (
44 rm -f build.log
45 cd mitgcm.org/devel/buildweb
46 make All | tee ../../../build.log
47 )
48 echo -n '-- Finish building manual at : ' ; date
49 if test -e scratch/dev_docs ; then
50 newbld="dev_docs_"`date +%Y%m%d`"_"`date +%H%M`
51 mv scratch/dev_docs $OUTDIR/$newbld
52 fi
53 #exit
54
55 (
56 cd $OUTDIR
57 test -e latest && rm -f latest
58 ln -s `ls -t | head -1` latest
59 # n=$(( `ls -d dev_docs* | wc -l` - 7 ))
60 n=$(( `ls dev_docs*/index.html | wc -l` - 7 ))
61 if test $n -gt 0 ; then
62 # ls -td dev_docs* | tail -"$n" | xargs rm -rf
63 ls -t dev_docs*/index.html | sed 's/\/index.html//' | tail -"$n" | xargs rm -rf
64 fi
65 )
66
67 echo -n '-- Done at : ' ; date

  ViewVC Help
Powered by ViewVC 1.1.22