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

Annotation of /mitgcm.org/scripts/daily_snapshot

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


Revision 1.2 - (hide annotations) (download)
Fri Feb 29 01:51:27 2008 UTC (16 years, 3 months ago) by jmc
Branch: MAIN
Changes since 1.1: +31 -2 lines
update scripts only once a day.

1 jmc 1.1 #! /usr/bin/env bash
2    
3 jmc 1.2 # $Header: /u/gcmpack/mitgcm.org/scripts/daily_snapshot,v 1.1 2008/02/16 18:40:03 jmc Exp $
4    
5     # download or update several dir. which are used for:
6     # - front_page building
7     # - processing testing emails (-> testing page, part of front_page building)
8     # - making a daily tar file of source code
9    
10     export CVSROOT=/u/gcmpack
11    
12     #- update scripts with explicit path:
13     echo -n 'Update dir:'
14     cd /u/u2/jmc/testing/scripts && pwd && cvs -q update -P -d
15    
16    
17     #-- update tools/mpack-1.6 dir :
18     tmpFil=/tmp/TTT.daily_snapshot.$$
19     exe=munpack
20     cd /u/u2/jmc/testing/tools_mpack
21     echo -n 'Update dir:' ; pwd
22     chg=`cvs -q update -P -d | tee $tmpFil | sed '/^?/d' | wc -l`
23     #echo "chg ='$chg'"
24     cat $tmpFil ; rm -f $tmpFil
25     if test "x$chg" != x0 ; then
26     if test -f $exe ; then echo " removing: $exe force re-build." ; fi
27     rm -f $exe
28     fi
29    
30     #- update front-page building dir:
31     echo -n 'Update dir:'
32     cd /u/u2/jmc/testing/front_content && pwd && cvs -q update -P -d
33 jmc 1.1
34     umask 0002
35    
36     echo 'Changing directory to /u/httpd/html/download/daily_snapshot'
37     cd /u/httpd/html/download/daily_snapshot
38     test -e MITgcm && rm -rf MITgcm
39    
40     echo 'Checking out MITgcm...'
41 jmc 1.2 cvs co -P MITgcm > /dev/null 2>&1
42 jmc 1.1 #chgrp gcmpack MITgcm
43     #chmod 775 MITgcm
44    
45     echo 'Creating the tar file...'
46     rm -rf MITgcm_ss_*
47     tname='MITgcm_ss_'`date +%Y%m%d`'.tar.gz'
48     tar -czf $tname ./MITgcm
49     #chmod 664 $tname
50     ls -l $tname
51    
52     echo 'Done!'
53    

  ViewVC Help
Powered by ViewVC 1.1.22