15 |
#OUTDIR='/u/u0/httpd/html/r2_manual' |
#OUTDIR='/u/u0/httpd/html/r2_manual' |
16 |
#- note: "mv" to relative path below is much faster than using full path above |
#- note: "mv" to relative path below is much faster than using full path above |
17 |
OUTDIR='../r2_manual' |
OUTDIR='../r2_manual' |
18 |
|
ADDRERR='jmc@ocean.mit.edu' |
19 |
|
|
20 |
echo |
echo |
21 |
echo " Removing previous directories..." |
echo " Removing previous directories..." |
44 |
( |
( |
45 |
rm -f build.log |
rm -f build.log |
46 |
cd mitgcm.org/devel/buildweb |
cd mitgcm.org/devel/buildweb |
47 |
make All | tee ../../../build.log |
make All > ../../../build.log 2>&1 |
48 |
) |
) |
49 |
echo -n '-- Finish building manual at : ' ; date |
echo -n '-- Finish building manual at : ' ; date |
50 |
if test -e scratch/dev_docs ; then |
|
51 |
newbld="dev_docs_"`date +%Y%m%d`"_"`date +%H%M` |
newbld="dev_docs_"`date +%Y%m%d`"_"`date +%H%M` |
52 |
|
if test -f scratch/dev_docs/index.html ; then |
53 |
echo " mv scratch/dev_docs $OUTDIR/$newbld" |
echo " mv scratch/dev_docs $OUTDIR/$newbld" |
54 |
mv scratch/dev_docs $OUTDIR/$newbld |
mv scratch/dev_docs $OUTDIR/$newbld |
55 |
|
else |
56 |
|
if test -e scratch/dev_docs ; then |
57 |
|
echo " mv scratch/dev_docs scratch/$newbld" |
58 |
|
mv scratch/dev_docs scratch/$newbld |
59 |
|
fi |
60 |
|
echo "========================================================" |
61 |
|
echo "error running '"`basename $0`"' at : "`date` | tee tmp.$$ |
62 |
|
echo " no file 'scratch/dev_docs/index.html' !" | tee -a tmp.$$ |
63 |
|
echo " ==> Incomplete build" | tee -a tmp.$$ |
64 |
|
echo "" | tee -a tmp.$$ |
65 |
|
echo "-> tail -15 build.log : >->->->->->->->->->->->->" | tee -a tmp.$$ |
66 |
|
tail -15 build.log | tee -a tmp.$$ |
67 |
|
echo "<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<" | tee -a tmp.$$ |
68 |
|
if test "x$ADDRERR" != x ; then |
69 |
|
mail -s `basename $0`' Error' $ADDRERR < tmp.$$ |
70 |
|
fi |
71 |
|
rm -f tmp.$$ |
72 |
|
exit 2 |
73 |
fi |
fi |
|
#exit |
|
74 |
|
|
75 |
( |
( |
76 |
cd $OUTDIR |
cd $OUTDIR |
77 |
echo -n "-- Install latest in dir: "`pwd` |
echo "-- Install latest in dir: "`pwd` |
78 |
test -e latest && rm -f latest |
test -e latest && rm -f latest |
79 |
echo -n " ln -s `ls -td dev_docs* | head -1` latest" |
echo " ln -s `ls -td dev_docs* | head -1` latest" |
80 |
ln -s `ls -td dev_docs* | head -1` latest |
ln -s `ls -td dev_docs* | head -1` latest |
81 |
n=$(( `ls dev_docs*/index.html | wc -l` - 7 )) |
n=$(( `ls dev_docs*/index.html | wc -l` - 7 )) |
82 |
if test $n -gt 0 ; then |
if test $n -gt 0 ; then |