Project

General

Profile

« Previous | Next » 

Revision 14534

lib/runscripts/extract.run: export_(): also compress created file

View differences:

extract.run
1 1
#!/bin/bash -e
2 2
. "$(dirname "${BASH_SOURCE[0]}")"/import.run "$@"
3
.rel ../sh/archives.sh
3 4
.rel ../sh/local.sh
4 5

  
5 6
if self_not_included; then
6 7

  
7 8
export extract_view="${top_filename%.csv}"
8 9

  
9
export_()
10
prep_export()
10 11
{
11
	begin_target; deferred_check_target_exists
12 12
	umask ug=rwx,o= # prevent files from becoming web-accessible
13
}
14

  
15
export_only()
16
{
17
	begin_target; deferred_check_target_exists; prep_export
13 18
	table="$extract_view" to_top_file pg_export
14 19
}
15 20

  
16
export_sample() { begin_target; n=100 with_rm export_; }
21
compress_()
22
{
23
	begin_target; deferred_check_target_exists; prep_export
24
	full_file="$top_file" compress
25
}
17 26

  
27
export_()
28
{
29
	begin_target
30
	with_rm export_only
31
	with_rm compress_
32
}
33

  
34
export_sample() { begin_target; n=100 with_rm export_only; }
35

  
18 36
fi

Also available in: Unified diff