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