Revision 14070
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/bin/import_all | ||
---|---|---|
10 | 10 |
. "$selfDir/with_all" import by_col=1 "$@" |
11 | 11 |
} |
12 | 12 |
|
13 |
delete_logs() { find . -name "${n:+n=$n.}$version.log.sql" -delete; } |
|
13 |
delete_logs() |
|
14 |
{ |
|
15 |
if test "$delete_logs"; then |
|
16 |
find . -name "${n:+n=$n.}$version.log.sql" -delete |
|
17 |
fi |
|
18 |
} |
|
14 | 19 |
|
15 | 20 |
main() |
16 | 21 |
{ |
... | ... | |
32 | 37 |
local by_col=${by_col-1} full_import=1 |
33 | 38 |
export version by_col full_import |
34 | 39 |
|
35 |
if test ! "${log-1}"; then trap delete_logs EXIT SIGINT SIGTERM; fi #log=='' |
|
40 |
if test ! "${log-1}"; then local delete_logs=1; fi #log=='' |
|
41 |
trap delete_logs EXIT SIGINT SIGTERM |
|
36 | 42 |
|
37 | 43 |
local log=1 # always use log files for background processes |
38 | 44 |
|
Also available in: Unified diff
bin/import_all: delete_logs: moved testing of whether to delete logs to delete_logs() so that delete_logs() can be run regardless of the $delete_logs setting