File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ render_templates() {
5
5
command -v gomplate > /dev/null 2>&1 || { error " This function requires gomplate to be installed." ; return 1; }
6
6
7
7
for item in " ${@ } " ; do
8
- local item_dirname tempfile
9
- [[ -e " ${item} " ]] || { error " File ${item} is missing." ; return 1; }
10
- item_dirname=" $( dirname " ${item} " ) "
11
- tempfile=" $( mktemp -p " ${item_dirname} " -t .tmp.XXXXXXXXXX) "
8
+ local item_dirname tempfile
9
+ [[ -e " ${item} " ]] || { error " File ${item} is missing." ; return 1; }
10
+ item_dirname=" $( dirname " ${item} " ) "
11
+ tempfile=" $( mktemp -p " ${item_dirname} " -t .tmp.XXXXXXXXXX) "
12
12
permissions=" $( stat -c ' %a' " ${item} " ) "
13
13
14
14
(>&1 echo " Rendering template ${item} " )
15
15
gomplate < " ${item} " > " ${tempfile} " || { rm " ${tempfile} " 2> /dev/null; error " Failed to render template ${item} ." ; return 1; }
16
- mv " ${tempfile} " " ${item/% \. tmpl/ } "
16
+ mv -f " ${tempfile} " " ${item/% \. tmpl/ } "
17
17
chmod " ${permissions} " " ${item/% \. tmpl/ } "
18
18
19
19
if [[ " ${DEBUG:- false} " == ' true' ]]; then
You can’t perform that action at this time.
0 commit comments