/[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.4 by jmc, Mon Jan 8 23:51:57 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 )
17    fi
18    
19  #- update csail testing scripts:  #- update csail testing scripts:
20  echo -n 'Update dir:'  if test -d csail ; then
21  cd /u/u2/jmc/testing/csail && pwd && cvs -q update -P -d   echo -n 'Update dir: '
22     ( cd csail && pwd && cvs -q update -P -d )
23    fi
24    
25  #-- update tools/mpack-1.6 dir :  #-- update tools/mpack-1.6 dir:
26  tmpFil=/tmp/TTT.daily_snapshot.$$  if test -d tools_mpack ; then
27  exe=munpack   echo -n 'Update dir: '
28  cd /u/u2/jmc/testing/tools_mpack   tmpFil=/tmp/TTT.daily_snapshot.$$
29  echo -n 'Update dir:' ; pwd   exe=munpack
30  chg=`cvs -q update -P -d | tee $tmpFil | sed '/^?/d' | wc -l`   ( cd tools_mpack ; pwd
31  #echo "chg ='$chg'"     chg=`cvs -q update -P -d | tee $tmpFil | sed '/^?/d' | wc -l`
32  cat $tmpFil ; rm -f $tmpFil    #echo "chg ='$chg'"
33  if test "x$chg" != x0 ; then     cat $tmpFil ; rm -f $tmpFil
34    if test -f $exe ; then echo " removing: $exe force re-build." ; fi     if test "x$chg" != x0 ; then
35    rm -f $exe       if test -f $exe ; then echo " removing: $exe force re-build." ; fi
36         rm -f $exe
37       fi
38     )
39  fi  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.4

  ViewVC Help
Powered by ViewVC 1.1.22