forked from global-hydrodynamics/CaMa-Flood_v4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive_src.sh
executable file
·143 lines (117 loc) · 2.51 KB
/
archive_src.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#!/bin/sh
TAG=`date '+%Y%m%d'`
VER="v400"
BASE=`pwd`
DIR="cmf_${VER}_src"
mkdir $DIR
cd $DIR
PKGBASE=`pwd`
cd $PKGBASE
#export COPYFILE_DISABLE=1
#tar czvf ${DIR}.tar.gz --exclude='.DS_Store' ${DIR}
#exit
##### Adm #####
cp -r ${BASE}/adm .
cd adm
pwd
rm -f ./.* 2> /dev/null
cd $PKGBASE
##### Util #####
cp -r ${BASE}/util .
cd util
pwd
rm -f ./.* 2> /dev/null
cd $PKGBASE
##### Src #####
mkdir -p src
cd src
pwd
cp ${BASE}/src/Makefile .
cp ${BASE}/src/*.F90 .
rm -f ./.* 2> /dev/null
cp -r ${BASE}/src/MOJ .
rm -f ./MOJ/.* 2> /dev/null
cd $PKGBASE
##### Map #####
mkdir -p map
cd map
pwd
mkdir -p src
cd src
mkdir src_param
cd src_param
pwd
cp ${BASE}/map/src/src_param/Makefile .
cp ${BASE}/map/src/src_param/*.F90 .
cp ${BASE}/map/src/src_param/*.sh .
rm -f ./.* 2> /dev/null
cd ..
mkdir src_region
cd src_region
pwd
cp ${BASE}/map/src/src_region/Makefile .
cp ${BASE}/map/src/src_region/*.F90 .
cp ${BASE}/map/src/src_region/*.sh .
cp ${BASE}/map/src/src_region/*.txt .
rm -f ./.* 2> /dev/null
cd ..
cd ..
cd $PKGBASE
##### gosh #####
mkdir -p gosh
cd gosh
pwd
cp ${BASE}/gosh/compile.sh .
cp ${BASE}/gosh/test*.sh .
rm -f ./.* 2> /dev/null
cd $PKGBASE
##### etc #####
mkdir -p etc
cd etc
pwd
PROJ="downscale_flddph"
mkdir $PROJ
cd $PROJ
cp ${BASE}/etc/$PROJ/*.sh .
cp ${BASE}/etc/$PROJ/*.py .
cp -r ${BASE}/etc/$PROJ/src .
cd src
make clean
cd ..
rm -f ./.* 2> /dev/null
rm -f ./src/.* 2> /dev/null
cd ..
PROJ="flood_duration"
mkdir $PROJ
cd $PROJ
cp ${BASE}/etc/$PROJ/*.sh .
cp ${BASE}/etc/$PROJ/*.py .
cp -r ${BASE}/etc/$PROJ/src .
cd src
make clean
cd ..
rm -f ./.* 2> /dev/null
rm -f ./src/.* 2> /dev/null
cd ..
PROJ="runoff_preset"
mkdir $PROJ
cd $PROJ
cp ${BASE}/etc/$PROJ/*.sh .
cp ${BASE}/etc/$PROJ/*.py .
cp -r ${BASE}/etc/$PROJ/src .
cd src
make clean
cd ..
rm -f ./.* 2> /dev/null
rm -f ./src/.* 2> /dev/null
cd ..
cd $PKGBASE
###
cp -r ${BASE}/doc .
rm -f ./doc/.* 2> /dev/null
cp ${BASE}/archive_pkg.sh .
cp ${BASE}/archive_src.sh .
#===========
cd ${BASE}
export COPYFILE_DISABLE=1
tar czvf ${DIR}.tar.gz --exclude='.DS_Store' ${DIR}