Project

General

Profile

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/sh/archives.sh
5
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/sh/local.sh
6

    
7
if self_not_included; then
8

    
9
VegCore.my.sql/make ()
10
{
11
	echo_func; set_make_vars
12
	database=VegCore mysqldump_local --skip-add-drop-table >"$target"
13
}
14

    
15
export_mysql ()
16
{
17
	echo_func
18
	VegCore.my.sql/make
19
}
20

    
21
VegCore.pg.sql/make ()
22
{
23
	echo_func; set_make_vars
24
	sql_ascii=1 my2pg <"${target%.pg.sql}.my.sql" >"$target"
25
}
26

    
27
export_postgres ()
28
{
29
	echo_func
30
	VegCore.pg.sql/make
31
}
32

    
33
export_ ()
34
{
35
	echo_func
36
	(cd "$top_dir"; unzip_newer "$top_filename" document.mwb.xml)
37
	export_mysql
38
	export_postgres
39
}
40

    
41
import ()
42
{
43
	echo_func
44
	(cd "$top_dir"; zip_newer "$top_filename" document.mwb.xml)
45
}
46

    
47
sync ()
48
{
49
	echo_func
50
	export_
51
	import
52
}
53

    
54
all ()
55
{
56
	echo_func
57
	sync
58
}
59

    
60
fi
(3-3/14)