-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-databases.sh
executable file
·174 lines (157 loc) · 3.65 KB
/
update-databases.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#!/usr/bin/env bash
set -e
set -x
shopt -s dotglob
readonly name="visit-databases"
readonly ownership="VisIt Upstream <[email protected]>"
readonly subtree="databases/readers"
readonly repo="https://gitlab.kitware.com/third-party/visit.git"
readonly tag="for/paraview-20220727-g756b0aa4ee"
readonly paths="
.gitattributes
README.kitware.md
src/databases/ANSYS
src/databases/AUXFile
src/databases/BOV
src/databases/Boxlib3D
src/databases/CEAucd
src/databases/CMAT
src/databases/CTRL
src/databases/Chombo
src/databases/Claw
src/databases/Curve2D
src/databases/DDCMD
src/databases/Dyna3D
src/databases/Enzo
src/databases/ExtrudedVol
src/databases/FLASH
src/databases/Fluent
src/databases/GGCM
src/databases/GTC
src/databases/GULP
src/databases/Gadget
src/databases/H5Nimrod
src/databases/Image
src/databases/LAMMPS
src/databases/Lines
src/databases/M3D
src/databases/M3DC1
src/databases/MFIX
src/databases/MFIXCDF
src/databases/MM5
src/databases/Mili
src/databases/Miranda
src/databases/NASTRAN
src/databases/NETCDF
src/databases/Nek5000
src/databases/OVERFLOW
src/databases/OpenFOAM
src/databases/PATRAN
src/databases/PFLOTRAN
src/databases/PLOT3D
src/databases/Pixie
src/databases/Point3D
src/databases/ProteinDataBank
src/databases/RAW
src/databases/SAMRAI
src/databases/SAR
src/databases/SAS
src/databases/Silo
src/databases/Spheral
src/databases/TFT
src/databases/TSurf
src/databases/Tecplot
src/databases/Tetrad
src/databases/UNIC
src/databases/VASP
src/databases/Velodyne
src/databases/Vs
src/databases/XYZ
src/databases/Xmdv
src/databases/paraDIS
src/databases/paraDIS_tecplot
"
database_cleanup () {
local reader="$1"
readonly reader
shift
local kind
case "$reader" in
Chombo|FLASH|GGCM|M3DC1|MFIXCDF|MFIX|Miranda|NASTRAN|Nek5000|OpenFOAM|paraDIS|Pixie|PLOT3D|ProteinDataBank|Vs)
kind="reader_options"
;;
BOV|Curve2D|ExtrudedVol|Image|Silo|Tecplot|Xmdv)
kind="writer"
;;
*)
kind="reader"
;;
esac
readonly kind
rm -v *MDServerPluginInfo.C
case "$kind" in
reader)
rm -vf *PluginInfo.* avt*Options.* avt*Writer.*
;;
reader_options)
rm -vf *Writer.*
;;
writer)
;;
esac
}
cleanup_LAMMPS () {
# This just abstracts over the other sub-formats.
rm -v avtLAMMPSFileFormat.*
}
cleanup_H5Nimrod () {
# Remove the PDF file describing the format.
rm -v nimrod.pdf
}
cleanup_PLOT3D () {
# Documentation tarball.
rm -v plot3d_html.tar
}
cleanup_VASP () {
# Unwrapped VASP readers.
rm -v avtVASPFileFormat.*
rm -v avtXDATFileFormat.*
}
cleanup_Vs () {
# Unused files.
rm -v VsStaggeredField.*
}
cleanup_paraDIS () {
rm -v RC_cpp_lib/RC_c_lib/gethostname.c
rm -v RC_cpp_lib/RC_c_lib/gprof-helper.c
rm -v RC_cpp_lib/RC_c_lib/signals.c
rm -v RC_cpp_lib/ComboBoxManager.*
rm -v RC_cpp_lib/RCLibConstants.h
rm -v RC_cpp_lib/cppFileUtils.h
rm -v RC_cpp_lib/debugutil-qt.*
rm -v RC_cpp_lib/test.C
rm -v paraDIS_tecplot.*
}
cleanup_paraDIS_tecplot () {
rm -vrf RC_cpp_lib
rm -vrf RC_c_lib
}
extract_source () {
git_archive
pushd "$extractdir/$name-reduced"
mv --target-directory=. src/databases/*
find . -name "*.code" -delete
find . -name "*.xml" -delete
for reader in *; do
[ -d "$reader" ] || continue
pushd "$reader"
mv -v "CMakeLists.paraview.txt" "CMakeLists.txt"
database_cleanup "$reader"
if type "cleanup_$reader" >/dev/null 2>/dev/null; then
"cleanup_$reader"
fi
popd
done
popd
}
. "${BASH_SOURCE%/*}/update-common.sh"