diff options
-rw-r--r-- | src/control.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/control.sh b/src/control.sh index 04a4c2d..6a92ff3 100644 --- a/src/control.sh +++ b/src/control.sh @@ -42,7 +42,9 @@ parse_control() local file="${1}" local field_cb="${2}" local paragraph_cb="${3}" - local req_fields="${4}" + shift 3 + local check_fields= + local req_fields= local line_nr= local in_paragraph= local line= @@ -51,6 +53,13 @@ parse_control() local name= local value= + check_fields='false' + if [ ${#} -eq 1 ]; then + req_fields="${1}" + shift 1 + check_fields='true' + fi + line_nr=0 in_paragraph='false' |