diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/mysql-functions | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions index 5173bfb..daef65b 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -58,6 +58,14 @@ mysql_run_query() { > "${query_stdout}" \ 2>> "${query_stderr}"; then if grep -qF 'DELETE `binary_packages' "${query_stdin}"; then + sed -n ' + s/^.*INFILE "\(\S\+\)".*$/\1/ + T + p + ' "${query_stdin}" | \ + while read -r file; do + cp "${file}" "${work_dir}/successful.${query_stdin##*/}.infile.${file##*/}" + done mv "${query_stdin}" "${work_dir}/successful.${query_stdin##*/}" else rm "${query_stdin}" |