helpers (bash): modify create_tmp_file() to store files in self-contained dir
This commit is contained in:
parent
78235324fc
commit
286322b3e6
1 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,10 @@ function container_exec() {
|
|||
|
||||
function create_tmp_file() {
|
||||
name="$1"
|
||||
tmp_path="/tmp/$@_$(date +%s)_$name"
|
||||
prefix_dir="/tmp/zio"
|
||||
tmp_path="$prefix_dir/$(date +%s).$name"
|
||||
|
||||
mkdir -p "$prefix_dir"
|
||||
touch "$tmp_path"
|
||||
echo "$tmp_path"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue