commit fb56e0dad8b0a1e0d2b9899faf03aa17a6ba2c3e parent 6cd75230f261f3922b910fd92fc1fb449c0cfecf Author: Jacob R. Edwards <jacobouno@protonmail.com> Date: Sun, 18 Apr 2021 16:46:24 -0700 Fix bwrite temp file name Diffstat:
| M | local/bin/.local/bin/bwrite | | | 3 | +-- |
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/local/bin/.local/bin/bwrite b/local/bin/.local/bin/bwrite @@ -11,8 +11,7 @@ # # $ awk '{ print ++$0 }' <x | bwrite x -dir="$(basename "$@")" -tmp="$(mktemp "$dir/bwrite-XXXXXXXXXX")" +tmp="$(mktemp "$(dirname "$@")/bwrite-XXXXXXXXXX")" trap "rm -f $tmp" 0 cat >"$tmp" mv "$tmp" "$@"