summaryrefslogtreecommitdiff
path: root/lib/common-functions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common-functions')
-rwxr-xr-xlib/common-functions8
1 files changed, 3 insertions, 5 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"