summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/common-functions8
-rwxr-xr-xlib/mysql-functions6
2 files changed, 5 insertions, 9 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 2d96350..34a3bf6 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -704,7 +704,7 @@ smoothen_namcap_log() {
trigger_mirror_refreshs() {
local tmp_file
- tmp_file=$(mktemp "tmp.common-functions.trigger_mirror_refreshs.XXXXXXXXXX" --tmpdir)
+ tmp_file=$(mktemp 'tmp.common-functions.trigger_mirror_refreshs.XXXXXXXXXX' --tmpdir)
date '+%s' > \
"${tmp_file}"
failsafe_rsync \
@@ -804,9 +804,7 @@ verbose_flock() {
# recompress_gz $tmp_dir $file1.gz $file2.gz ...
# recompress the given file(s) to make them rsync friendly
recompress_gz() {
- tmp_file=$(
- mktemp "$1/recompress_gz.XXXXXXXX"
- )
+ tmp_file=$(mktemp "$1/recompress_gz.XXXXXXXX")
shift
local file
for file in "$@"; do
@@ -829,7 +827,7 @@ recompress_gz() {
# - commands must be executable in arbitrary order
failsafe_sftp() {
( # new shell is intentional
- temp_dir=$(mktemp -d "tmp.common-functions.sftp_failsave.XXXXXXXXXX")
+ temp_dir=$(mktemp -d 'tmp.common-functions.sftp_failsafe.XXXXXXXXXX' --tmpdir)
trial_counter=20
trap 'rm -rf --one-file-system "${temp_dir}"' EXIT
cat > "${temp_dir}/input"
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 438e498..f1b663e 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -682,7 +682,7 @@ mysql_sanity_check() {
# recreate the `build_dependency_loops` table
mysql_find_build_assignment_loops() {
( # new shell is intentional
- tmp_file=$(mktemp "tmp.mysql-functions.mysql_find_build_assignment_loops.XXXXXXXXXX")
+ tmp_file=$(mktemp 'tmp.mysql-functions.mysql_find_build_assignment_loops.XXXXXXXXXX' --tmpdir)
trap 'rm "${tmp_file}"' EXIT
{
printf 'SELECT DISTINCT `architectures`.`id`'
@@ -1178,9 +1178,7 @@ mysql_query_and_delete_unneeded_binary_packages() {
mysql_sort_versions() {
( # new shell is intentional
- tmp_file=$(
- mktemp "tmp.mysql_sort_versions.XXXXXXXXXX" --tmpdir
- )
+ tmp_file=$(mktemp 'tmp.mysql_sort_versions.XXXXXXXXXX' --tmpdir)
trap 'rm "${tmp_file}"' EXIT
if [ "x$1" != 'x-f' ] && \
{