aboutsummaryrefslogtreecommitdiff
path: root/tests/manifest-parser/driver.in
blob: bdc16bbd249365e5b2eeae12dfed8e2c2248ced5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

# file      : tests/manifest-parser/driver.in
# license   : MIT; see accompanying LICENSE file

trap "{ exit 1; }" ERR
set -o errtrace # Trap ERR in functions.

@import libbutl.bash/manifest-parser@

butl_manifest_parser_start "$@"

while IFS=: read -ru "$butl_manifest_parser_ofd" -d '' n v; do
  if [ -z "$n" ]; then
    echo "$v"
  else
    echo # Extra newline after first pair.
    echo "$n"
    echo "$v"
  fi
done

butl_manifest_parser_finish