summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-19 06:22:14 +0200
committerErich Eckner <git@eckner.net>2018-04-19 06:22:14 +0200
commit89c2daf4f7979550b94e29306f46169a339db0ce (patch)
tree590c68466e3e5e0016d3367d49a1fba408316d98
parent70d1655a41aedd99768e469e3fed8636324d3b30 (diff)
downloadbuilder-89c2daf4f7979550b94e29306f46169a339db0ce.tar.xz
lib/mysql-functions: strip path from file on cp and chmod
-rwxr-xr-xlib/mysql-functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 0e4b952..8101e0c 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -67,8 +67,8 @@ mysql_run_query() {
"${query_stdin}" \
"${query_stdout}" \
"${query_stderr}"; do
- cp "${file}" "${webserver_directory}/mysql-queries/${file}.txt"
- chmod go+r "${webserver_directory}/mysql-queries/${file}.txt"
+ 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