__ini_value: make shellcheck happy

This commit is contained in:
matze 2021-03-14 14:50:21 +01:00
parent e3e4a91abe
commit 8f687e5ce2
1 changed files with 5 additions and 5 deletions

View File

@ -75,8 +75,8 @@ SHELL
elif [ "$state_should" != "absent" ]; then
# generate the indentation string
spaces() {
_i=$1
while [ $_i -gt 0 ]; do
_i="$1"
while [ "$_i" -gt 0 ]; do
printf " "
_i=$((_i - 1))
done
@ -88,10 +88,10 @@ SHELL
delimiter="$(cat "$__object/parameter/delimiter")"
value="$(cat "$__object/parameter/value")"
indentation="$(cat "$__object/parameter/indentation" || true)"
i_indent="$(spaces $indentation)"
i_indent="$(spaces "$indentation")"
delimiter_space="$(cat "$__object/parameter/delimiter-space" || true)"
i_del_space="$(spaces $delimiter_space)"
comment_sign="$(cat "$__object/parameter/comment-sign" | cut -c1)"
i_del_space="$(spaces "$delimiter_space")"
comment_sign="$(cut -c1 < "$__object/parameter/comment-sign")"
# Generate a simple shell script which just generates the file
printf "cat <<'FILE' > '%s'\n" "$file"