/[MITgcm]/MITgcm/verification/exp1/setup.sh
ViewVC logotype

Annotation of /MITgcm/verification/exp1/setup.sh

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


Revision 1.2 - (hide annotations) (download) (as text)
Fri Jul 17 02:15:41 1998 UTC (25 years, 10 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint13, checkpoint15, checkpoint14, checkpoint17, checkpoint16, checkpoint18
Changes since 1.1: +1 -1 lines
File MIME type: application/x-sh
Changed cp options to get dates correct on copied files

1 cnh 1.1 #!/bin/csh -f
2     #
3     #
4     clear
5    
6     echo "|==========================================================|"
7     echo "| |"
8     echo "| MITgcmUV Baseline Code reconfiguration script |"
9     echo "| |"
10     echo "|==========================================================|"
11    
12     set UV_CONFIG_DIR = ( `pwd` )
13     echo " "
14     echo " - Using MITgcmUV configuration directory = " \"${UV_CONFIG_DIR}\"
15    
16     cd ../..
17     set UV_BASELINE_DIR = ( `pwd` )
18     echo " - Updating MITgcmUV baseline directory = " \"${UV_BASELINE_DIR}\"
19    
20     echo " "
21     echo 'Press ctrl-C to quit, yes to continue'
22     echo " "
23    
24     set response = ( $< )
25     if ( "$response" != "yes" ) then
26     echo You said \" $response \" configure abandoned
27     sleep 2
28     exit
29     endif
30    
31     clear
32     echo "|==========================================================|"
33     echo "| |"
34     echo "| MITgcmUV Baseline Code reconfiguration script |"
35     echo "| |"
36     echo "|==========================================================|"
37     echo " "
38     echo "Building list of files to change "
39     cd ${UV_CONFIG_DIR}/changes
40     set fc = 0
41     foreach f ( `find . -type f` )
42     set CVS_DIR = ( `echo $f | grep 'CVS' ` )
43     if ( "$CVS_DIR" == "" ) then
44     set f = ( `echo $f | sed s'/^\.\/\(.*\)/\1/' ` )
45     set fnam = ${f:t}
46     if ( -f ${UV_BASELINE_DIR}/$f ) then
47     cmp $f ${UV_BASELINE_DIR}/$f >& /dev/null
48     set cstat = ( $status )
49     endif
50     if ( "$cstat" != "0" ) then
51     echo \"$f\"
52     @ fc = $fc + 1
53     endif
54     endif
55     end
56    
57     if ( "$fc" == "0" ) then
58     echo " "
59     echo '** No changes are needed **'
60     echo All files in configuration directory \"${UV_CONFIG_DIR}/changes\" are the same as those in \"${UV_BASELINE_DIR}\"
61     sleep 2
62     echo " "
63     exit
64     endif
65    
66     echo " "
67     echo 'Press ctrl-C to quit, yes to continue'
68     echo " "
69    
70     set response = ( $< )
71     if ( "$response" != "yes" ) then
72     echo You said \" $response \" configure abandoned
73     sleep 2
74     exit
75     endif
76    
77     clear
78     echo "|==========================================================|"
79     echo "| |"
80     echo "| MITgcmUV Baseline Code reconfiguration script |"
81     echo "| |"
82     echo "|==========================================================|"
83     echo " "
84     cd ${UV_CONFIG_DIR}/changes
85     foreach f ( `find . -type f` )
86     set CVS_DIR = ( `echo $f | grep 'CVS' ` )
87     if ( "$CVS_DIR" == "" ) then
88     set f = ( `echo $f | sed s'/^\.\/\(.*\)/\1/' ` )
89     set fnam = ${f:t}
90     if ( -f ${UV_BASELINE_DIR}/$f ) then
91     cmp $f ${UV_BASELINE_DIR}/$f >& /dev/null
92     set cstat = ( $status )
93     endif
94     if ( "$cstat" != "0" ) then
95     echo "Replacing $f"
96 cnh 1.2 \cp -r $f ${UV_BASELINE_DIR}/$f
97 cnh 1.1 endif
98     endif
99     end
100    

  ViewVC Help
Powered by ViewVC 1.1.22