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

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

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

revision 1.1 by jmc, Mon Mar 3 01:47:26 2008 UTC revision 1.2 by jmc, Mon Mar 3 20:32:00 2008 UTC
# Line 48  echo -n " : done " ; date Line 48  echo -n " : done " ; date
48  echo -n '-- Finish building manual at : ' ; date  echo -n '-- Finish building manual at : ' ; date
49  if test -e scratch/dev_docs ; then  if test -e scratch/dev_docs ; then
50      newbld="dev_docs_"`date +%Y%m%d`"_"`date +%H%M`      newbld="dev_docs_"`date +%Y%m%d`"_"`date +%H%M`
51        echo " mv scratch/dev_docs $OUTDIR/$newbld"
52      mv scratch/dev_docs $OUTDIR/$newbld      mv scratch/dev_docs $OUTDIR/$newbld
53  fi  fi
54  #exit  #exit
55    
56  (  (
57    cd $OUTDIR    cd $OUTDIR
58      echo -n "-- Install latest in dir: "`pwd`
59    test -e latest  &&  rm -f latest    test -e latest  &&  rm -f latest
60    ln -s `ls -t | head -1` latest    echo -n " ln -s `ls -td dev_docs* | head -1` latest"
61  # n=$(( `ls -d dev_docs* | wc -l` - 7 ))    ln -s `ls -td dev_docs* | head -1` latest
62    n=$(( `ls dev_docs*/index.html | wc -l` - 7 ))    n=$(( `ls dev_docs*/index.html | wc -l` - 7 ))
63    if test $n -gt 0 ; then    if test $n -gt 0 ; then
64  #   ls -td dev_docs* | tail -"$n" | xargs rm -rf      echo -n ' remove dir: '
65        ls -t dev_docs*/index.html | sed 's/\/index.html//' | tail -"$n"
66      ls -t dev_docs*/index.html | sed 's/\/index.html//' | tail -"$n" | xargs rm -rf      ls -t dev_docs*/index.html | sed 's/\/index.html//' | tail -"$n" | xargs rm -rf
67    fi    fi
68  )  )

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22