use $__object/tempfile in target instead of mktemp, add comments

This commit is contained in:
ander 2021-09-14 22:24:26 +03:00
parent d7fdc8006f
commit 0f6e48dbc6
No known key found for this signature in database
GPG Key ID: 0A2971E562D618F3
1 changed files with 4 additions and 1 deletions

View File

@ -35,8 +35,11 @@ then
exit 0
fi
# we can't use -i, because it's not posix, so we fly with tempfile and cp
# and we use cp because we want to preserve destination file's attributes
# shellcheck disable=SC2016
echo 'tmp="$( mktemp )"'
echo 'tmp="$__object/tempfile"'
echo "$sed_cmd -f - '$file' > \"\$tmp\" << EOF"