From f7aa769f739a0e356905beae84a413ed3630dea4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 5 Jul 2018 08:44:45 +0200 Subject: lib/mysql-functions: mysql_run_query(): clean outputfile differently --- lib/mysql-functions | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/mysql-functions b/lib/mysql-functions index bd467af..d9cd057 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -88,10 +88,12 @@ mysql_run_query() { fi return 2 fi - ( - trap 'rm "${query_stdout}"' EXIT - cat "${query_stdout}" - ) + # shellcheck disable=SC2094 + { + rm "${query_stdout}" + cat + } < \ + "${query_stdout}" } # mysql_add_package_source $pkgbase $git_revision $old_git_revision $mod_git_revision $upstream_package_repository $srcinfo_file -- cgit v1.2.3-70-g09d2