small envs_user_updated.sh optimations

This commit is contained in:
creme 2019-11-29 11:29:45 +01:00
parent 8e97f26ad3
commit d4a11664f8
Signed by: creme
GPG Key ID: C147C3B7FBDF08D0
1 changed files with 5 additions and 5 deletions

View File

@ -183,15 +183,15 @@ EOM
EOM
else
# continue user def. array
if ! [[ "$field_count" -eq '0' ]]; then
cat << EOM >> "$TMP_JSON"
cat << EOM >> "$TMP_JSON"
"${line_to_set[$field]}",
EOM
# end of user def. array
else
if [[ "$field_count" -eq '0' ]]; then
# end of user def. array
# remove trailing ',' on last user entry
unset field_in_progress
sed -i '$ s/,$//' "$TMP_JSON"
cat << EOM >> "$TMP_JSON"
"${line_to_set[$field]}"
],
EOM
fi