From c0973425861ac911a887d0865905571673ce41de Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 24 Sep 2018 10:22:08 +0200 Subject: unify mktemp definitions to use --tmpdir if appropriate --- bin/harvest-commit-times | 2 +- bin/modify-package-state | 2 +- bin/repo-copy | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/harvest-commit-times b/bin/harvest-commit-times index 91c96ba..1f8c2e0 100755 --- a/bin/harvest-commit-times +++ b/bin/harvest-commit-times @@ -58,7 +58,7 @@ if ! verbose_flock ${block_flag} 9; then exit fi -tmp_file=$(mktemp "tmp.harvest-commit-times.XXXXXXXXXX") +tmp_file=$(mktemp 'tmp.harvest-commit-times.XXXXXXXXXX' --tmpdir) trap 'rm "${tmp_file}"' EXIT # shellcheck disable=SC2016 diff --git a/bin/modify-package-state b/bin/modify-package-state index b4425ec..25b70f2 100755 --- a/bin/modify-package-state +++ b/bin/modify-package-state @@ -115,7 +115,7 @@ if ${report}; then cat "${output_file}" > "${input_file}" rm -f "${output_file}" } - output_file=$(mktemp 'tmp.modify-package-state.XXXXXXXXXX') + output_file=$(mktemp 'tmp.modify-package-state.XXXXXXXXXX' --tmpdir) trap 'move_output' EXIT else output_file='/dev/null' diff --git a/bin/repo-copy b/bin/repo-copy index 803cae3..ee3ac2e 100755 --- a/bin/repo-copy +++ b/bin/repo-copy @@ -28,7 +28,7 @@ to_repo="$2" shift shift -tmp_dir=$(mktemp -d "${TMPDIR:-/tmp}/repo-tools.XXXXXXXXXX") +tmp_dir=$(mktemp -d 'repo-tools.XXXXXXXXXX' --tmpdir) trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT # extract the databases -- cgit v1.2.3