Remove service addresses, add graph letters (#15513).
[tor-metrics-tasks.git] / task-2714 / generate-consensus-hsdir-lists
blob9c09ac8b6c408b05123b46793a5f20ebdf3ad34a
1 #!/bin/sh -e
3 # This script must be run as ./generate-consensus-hsdir-lists .
5 # This script will die horribly later if $consensus_archive_dir
6 # expands to a string containing a shell metacharacter, so don't try
7 # to not die now.
8 test -z $consensus_archive_dir &&
9 export consensus_archive_dir=/usr/local/opt/tor-consensuses
12 mkdir -m 0700 -p dev/
13 for i in 0 1 2 3 ;do mkfifo -m 0600 dev/in$i dev/out$i || true ;done
15 mkdir -p out/consensus-hsdir-lists
18 (cd "$consensus_archive_dir" ;find consensuses-* -type f -print ) |
19 sed -e 's|^|./list-consensus-hsdirs |' |
20 linedemux --fname -- dev/in0 dev/in1 dev/in2 dev/in3 &
22 sh <dev/in0 >dev/out0 &
23 sh <dev/in1 >dev/out1 &
24 sh <dev/in2 >dev/out2 &
25 sh <dev/in3 >dev/out3 &
27 linemux --fname -- dev/out0 dev/out1 dev/out2 dev/out3