index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2020-02-04 22:22:59 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-02-04 22:22:59 +0100 |
commit | 3771352050c5cf1a103af8faf0711164d724083b (patch) | |
tree | 73195584e89b00c588410e86262d03d106532f15 /lib | |
parent | 43b983ff97df9216c966023c50ceac9f4a4c36e4 (diff) |
-rwxr-xr-x | lib/mysql-functions | 8 |
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}" |