diff options
author | Rob Austein <sra@hactrn.net> | 2006-10-30 23:28:52 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2006-10-30 23:28:52 +0000 |
commit | 1bb1bfd77ed5c0d15c4d98e2e46008bf89837c53 (patch) | |
tree | 114dd2ef26b5562b129cf44ca6096190e74148f1 /tests/uri/table.awk | |
parent | d5e86cdf9029e5918bc77f622a03a56277fcfd34 (diff) |
checkpoint
svn path=/tests/uri/dot.awk; revision=461
Diffstat (limited to 'tests/uri/table.awk')
-rw-r--r-- | tests/uri/table.awk | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/uri/table.awk b/tests/uri/table.awk new file mode 100644 index 00000000..d8627f67 --- /dev/null +++ b/tests/uri/table.awk @@ -0,0 +1,35 @@ +#!/usr/bin/awk -f +# $Id$ +# +# Reformat uri.c's output in a way that's more useful +# for some kinds of scripting. Perhaps this functionality should be +# part of uri.c itself, but for now this script will do. + +BEGIN { + cmd = "find /var/rcynic/data/unauthenticated -type f -name '*.cer' -print0 | xargs -0 ./uri -d"; + while ((cmd | getline) == 1) { + if ($1 == "File") { + if (f) + print f, u, a, s, c; + a = s = c = "-"; + f = $2; + sub("/var/rcynic/data/unauthenticated/","rsync://"); + u = $2; + continue; + } + if ($1 == "SIA:") { + s = $2; + continue; + } + if ($1 == "AIA:") { + a = $2; + continue; + } + if ($1 == "CRL:") { + c = $2; + continue; + } + } + if (f != "-") + print f, u, a, s, c; +} |