Browse Source

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

ander/__sed
Ander Punnar 4 months ago
parent
commit
0f6e48dbc6
No known key found for this signature in database GPG Key ID: A2971E562D618F3
  1. 5
      cdist/conf/type/__sed/gencode-remote

5
cdist/conf/type/__sed/gencode-remote

@ -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"

Loading…
Cancel
Save