blob: 06b8ed1ab2c49c0e4b644e91a4487071a398760f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
# This file is in the public domain.
#
# This code converts (some of) the JSON output from
# Challenger into the GNU Taler
# specific KYC attribute data (again in JSON format).
#
# Die if anything goes wrong.
set -eu
# First, extract everything from stdin.
J=$(jq '{"first":.first_name,"last".last_name"}')
# Next, combine some fields into larger values.
FULLNAME=$(echo "$J" | jq -r '[.first,.last]|join(" ")')
jq \
--arg full_name "${FULLNAME}" \
'{$full_name}'
exit 0
|