summaryrefslogtreecommitdiff
path: root/lib/mysql-functions
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-07-04 16:03:30 +0200
committerErich Eckner <git@eckner.net>2018-07-04 16:03:30 +0200
commit35d94affd8c64b89cbe27f54dc662d50b6fc5ebb (patch)
treeaf7dc22688951cc98aa901cb1da56aea988eaf92 /lib/mysql-functions
parent014522301d45f216808720d1b4d7a2d5b624c5fd (diff)
downloadbuilder-35d94affd8c64b89cbe27f54dc662d50b6fc5ebb.tar.xz
lib/mysql-functions: mysql_run_query(): rm stdout in trap
Diffstat (limited to 'lib/mysql-functions')
-rwxr-xr-xlib/mysql-functions6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 1a60802..bd467af 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -88,8 +88,10 @@ mysql_run_query() {
fi
return 2
fi
- cat "${query_stdout}"
- rm "${query_stdout}"
+ (
+ trap 'rm "${query_stdout}"' EXIT
+ cat "${query_stdout}"
+ )
}
# mysql_add_package_source $pkgbase $git_revision $old_git_revision $mod_git_revision $upstream_package_repository $srcinfo_file