Project

General

Profile

1
#!/bin/sh
2
# Transforms a map spreadsheet to use a different root, using a connecting root
3
# that links the input and output roots together
4

    
5
selfDir="$(dirname -- "$0")"
6

    
7
if test -z "${left_connect+t}" -o -z "${right_connect+t}"; then
8
    echo "Usage: env ch_root_opts... left_connect=... right_connect=... $0 \
9
<in_map >out_map" >&2
10
    exit 2
11
fi
12

    
13
env \
14
left_out_root="$left_connect" \
15
right_out_root="$right_connect" \
16
"$selfDir/ch_root"\
17
|env \
18
left_in_root="$left_out_root" \
19
right_in_root="$right_out_root" \
20
"$selfDir/ch_root"
21
# replace the root with the connector, and then re-root as the out_root
(3-3/53)