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

# file      : tests/manifest-parser/driver.in
# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

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

@import libbutl/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