/[MITgcm]/mitgcm.org/scripts/daily_update
ViewVC logotype

Diff of /mitgcm.org/scripts/daily_update

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

revision 1.3 by jmc, Wed Jan 3 16:40:30 2018 UTC revision 1.6 by jmc, Thu Dec 27 16:19:18 2018 UTC
# Line 2  Line 2 
2    
3  # $Header$  # $Header$
4    
5  # update several dir. which are used for:  # Run in: ~/testing/ to update several dir. which are used for:
6  # - front_page building  # - front_page building
7  # - processing testing emails (-> testing page, part of front_page building)  # - processing testing emails (-> testing page, part of front_page building)
8  # - making a daily tar file of source code  # - making a daily tar file of source code
9    
10  export CVSROOT=/u/gcmpack  export CVS_RSH=ssh
11    export CVSROOT=':ext:jmc@mitgcm.org:/u/gcmpack'
12    
13  #- update scripts with explicit path:  #- update scripts dir:
14  echo -n 'Update dir:'  if test -d scripts ; then
15  cd /u/u2/jmc/testing/scripts && pwd && cvs -q update -P -d   echo -n 'Update dir: '
16     ( cd scripts && pwd && cvs -q update -P -d )
 #- update csail testing scripts:  
 echo -n 'Update dir:'  
 cd /u/u2/jmc/testing/csail && pwd && cvs -q update -P -d  
   
 #-- update tools/mpack-1.6 dir :  
 tmpFil=/tmp/TTT.daily_snapshot.$$  
 exe=munpack  
 cd /u/u2/jmc/testing/tools_mpack  
 echo -n 'Update dir:' ; pwd  
 chg=`cvs -q update -P -d | tee $tmpFil | sed '/^?/d' | wc -l`  
 #echo "chg ='$chg'"  
 cat $tmpFil ; rm -f $tmpFil  
 if test "x$chg" != x0 ; then  
   if test -f $exe ; then echo " removing: $exe force re-build." ; fi  
   rm -f $exe  
17  fi  fi
18    
19    #- update ref_machine testing scripts:
20    if test -d ref_machine ; then
21     echo -n 'Update dir: '
22     ( cd ref_machine && pwd && cvs -q update -P -d )
23    fi
24    
25    #-- update tools/mpack-1.6 dir:
26    # if test -d tools_mpack ; then
27    #  echo -n 'Update dir: '
28    #  tmpFil=/tmp/TTT.daily_snapshot.$$
29    #  exe=munpack
30    #  ( cd tools_mpack ; pwd
31    #    chg=`cvs -q update -P -d | tee $tmpFil | sed '/^?/d' | wc -l`
32    #   #echo "chg ='$chg'"
33    #    cat $tmpFil ; rm -f $tmpFil
34    #    if test "x$chg" != x0 ; then
35    #      if test -f $exe ; then echo " removing: $exe force re-build." ; fi
36    #      rm -f $exe
37    #    fi
38    #  )
39    # fi
40    
41  #- update front-page building dir:  #- update front-page building dir:
42  echo -n 'Update dir:'  if test -d front_content ; then
43  cd /u/u2/jmc/testing/front_content && pwd && cvs -q update -P -d   echo -n 'Update dir: '
44     ( cd front_content && pwd && cvs -q update -P -d )
45    fi
46    
47  #-- clean-up old log files:  #-- clean-up old log files:
48  cd /u/u2/jmc/testing/logs  cd logs
49  n=$(( `ls bld_manual.* | wc -l` - 10 ))  n=$(( `ls bld_manual.* 2>/dev/null | wc -l` - 10 ))
50  if test $n -gt 0 ; then  if test $n -gt 0 ; then
51    echo -n ' remove files: '    echo -n ' remove files: '
52      ls -lt bld_manual.* | tail -"$n"      ls -lt bld_manual.* | tail -"$n"
53      ls -t  bld_manual.* | tail -"$n" | xargs rm -f      ls -t  bld_manual.* | tail -"$n" | xargs rm -f
54  fi  fi
55  p=`ls check_outp_*.txt_bak | wc -l`  p=`ls check_outp_*.txt_bak 2>/dev/null | wc -l`
56  n=$(( `ls check_outp_*.txt | wc -l` - 15 ))  n=$(( `ls check_outp_*.txt 2>/dev/null | wc -l` - 15 ))
57  if test $p -gt 0 -o $n -gt 0 ; then echo -n ' remove files: ' ; fi  if test $p -gt 0 -o $n -gt 0 ; then echo -n ' remove files: ' ; fi
58  if test $p -gt 0 ; then  if test $p -gt 0 ; then
59    ls    check_outp_*.txt_bak    ls    check_outp_*.txt_bak
# Line 53  if test $n -gt 0 ; then Line 63  if test $n -gt 0 ; then
63      ls -lt check_outp_*.txt | tail -"$n"      ls -lt check_outp_*.txt | tail -"$n"
64      ls -t  check_outp_*.txt | tail -"$n" | xargs rm -f      ls -t  check_outp_*.txt | tail -"$n" | xargs rm -f
65  fi  fi
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22