forked from ungleich-public/cdist
use $__object/tempfile in target instead of mktemp, add comments
This commit is contained in:
parent
d7fdc8006f
commit
0f6e48dbc6
1 changed files with 4 additions and 1 deletions
|
@ -35,8 +35,11 @@ then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
# shellcheck disable=SC2016
|
||||||
echo 'tmp="$( mktemp )"'
|
echo 'tmp="$__object/tempfile"'
|
||||||
|
|
||||||
echo "$sed_cmd -f - '$file' > \"\$tmp\" << EOF"
|
echo "$sed_cmd -f - '$file' > \"\$tmp\" << EOF"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue