2
0
Fork 0

helpers (bash): modify create_tmp_file() to store files in self-contained dir

main
Ducky 2023-08-25 01:38:49 +01:00
parent 78235324fc
commit 286322b3e6
1 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,10 @@ function container_exec() {
function create_tmp_file() { function create_tmp_file() {
name="$1" 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" touch "$tmp_path"
echo "$tmp_path" echo "$tmp_path"
} }