From ddf0be8a7d00ad20f9dd73e244cf50c6baf779f2 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 14 Jul 2023 22:30:39 +0200 Subject: mysql_run_query(): if it is called by an intention, log the whole intention --- lib/mysql-functions | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/mysql-functions') diff --git a/lib/mysql-functions b/lib/mysql-functions index 5695b97..efa7c54 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -48,6 +48,12 @@ mysql_run_query() { query_stderr="${query_stdin%.stdin}.stderr" { printf -- '-- called by %s\n' "$0" + if printf '%s\n' "$0" \ + | grep -qF intention; then + sed ' + s@^@-- : @ + ' "$0" + fi cat } > "${query_stdin}" for _ in $(seq 10); do -- cgit v1.2.3-70-g09d2