root/schemas/VegCore/VegCore.ERD.mwb.run @ 8941
1 |
#!/bin/bash -e
|
---|---|
2 |
# syncs VegCore.ERD.mwb's zip file contents
|
3 |
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/runscripts/util.run |
4 |
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/local.sh |
5 |
|
6 |
if self_not_included; then |
7 |
|
8 |
VegCore.my.sql/make ()
|
9 |
{
|
10 |
echo_func; set_make_vars
|
11 |
database=VegCore mysqldump_local --skip-add-drop-table >"$target" |
12 |
}
|
13 |
|
14 |
export_mysql ()
|
15 |
{
|
16 |
echo_func |
17 |
VegCore.my.sql/make |
18 |
}
|
19 |
|
20 |
VegCore.pg.sql/make ()
|
21 |
{
|
22 |
echo_func; set_make_vars
|
23 |
my2pg <"${target%.pg.sql}.my.sql" >"$target" |
24 |
}
|
25 |
|
26 |
export_postgres ()
|
27 |
{
|
28 |
echo_func |
29 |
VegCore.pg.sql/make |
30 |
}
|
31 |
|
32 |
export_ ()
|
33 |
{
|
34 |
echo_func |
35 |
(cd "$top_dir"; unzip_newer "$top_filename" document.mwb.xml) |
36 |
export_mysql |
37 |
export_postgres |
38 |
}
|
39 |
|
40 |
import ()
|
41 |
{
|
42 |
echo_func |
43 |
(cd "$top_dir"; zip_newer "$top_filename" document.mwb.xml) |
44 |
}
|
45 |
|
46 |
sync () |
47 |
{
|
48 |
echo_func |
49 |
export_ |
50 |
import |
51 |
}
|
52 |
|
53 |
all ()
|
54 |
{
|
55 |
echo_func |
56 |
sync
|
57 |
}
|
58 |
|
59 |
fi
|