index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-04-18 21:14:55 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-18 21:14:55 +0200 |
commit | 70d1655a41aedd99768e469e3fed8636324d3b30 (patch) | |
tree | 09006af50d3b7df172ffc31b5f6075f196044dcb /lib/mysql-functions | |
parent | 97e0e4a78e314b0eea8099768de4c75760935b1e (diff) |
-rwxr-xr-x | lib/mysql-functions | 11 |
diff --git a/lib/mysql-functions b/lib/mysql-functions index 66b1512..0e4b952 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -30,6 +30,7 @@ mysql_run_query() { local query_stderr local file_name_extra + local file file_name_extra='' if [ "x$1" = 'xunimportant' ]; then @@ -62,13 +63,13 @@ mysql_run_query() { printf '\001ACTION failed to execute a mysql query - can you have a look at "%s"?.\001\n' \ "${query_stdin##*/}" \ | irc_say - cp \ + for file in \ "${query_stdin}" \ "${query_stdout}" \ - "${query_stderr}" \ - "${webserver_directory}/mysql-queries/" - find "${webserver_directory}/mysql-queries/" -type f \ - -exec chmod go+r {} \; + "${query_stderr}"; do + cp "${file}" "${webserver_directory}/mysql-queries/${file}.txt" + chmod go+r "${webserver_directory}/mysql-queries/${file}.txt" + done fi if [ -z "${file_name_extra}" ]; then echo 'A mysql query failed.' > \ |