aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-05-03 17:31:43 -0300
committerEuAndreh <eu@euandre.org>2023-05-03 17:31:43 -0300
commit84f2f651137af76ab05879d56983c9a0d0abb94a (patch)
tree3eb4da64d3be0af50e2373e14d782a0d21dd3394
parentetc/guix/home.scm: Add "pandas" and "sklearn" Python packages (diff)
downloaddotfiles-84f2f651137af76ab05879d56983c9a0d0abb94a.tar.gz
dotfiles-84f2f651137af76ab05879d56983c9a0d0abb94a.tar.xz
bin/ifnew: Create tmpfile in the same directory to leverage "mv" in the same filesystem
-rwxr-xr-xbin/ifnew2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ifnew b/bin/ifnew
index f4a4120..402c3b3 100755
--- a/bin/ifnew
+++ b/bin/ifnew
@@ -91,7 +91,7 @@ FILE="${1:-}"
eval "$(assert-arg -- "$FILE" 'FILE')"
-STDIN="$(mkstemp)"
+STDIN="$FILE.$(uuid).tmp"
trap 'rm -f "$STDIN"' EXIT
cat - > "$STDIN"