Re: [PATCH 01/10] t: add tool to translate hash-related values
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jul 25, 2018, 08:33 UTC
- Message-ID
- <CAPig+cT44egNgzMKLHwJb-WHkpK1gnVrre_Ebv+O8xnemRRWRw@mail.gmail.com>
- In-Reply-To
- <20180724221712.GJ18502@genre.crustytoothpaste.net>
On Tue, Jul 24, 2018 at 6:17 PM brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 36 quoted lines
> On Mon, Jun 11, 2018 at 03:47:43AM -0400, Eric Sunshine wrote:
> > Here's what I had envisioned when reading your emails about OID lookup
> > table functionality:
> >
> > --- >8 ---
> > test_oid_cache () {
> > while read tag rest
> > do
> > case $tag in \#*) continue ;; esac
> >
> > for x in $rest
> > do
> > k=${x%:*}
> > v=${x#*:}
> > if test "$k" = $test_hash_algo
> > then
> > eval "test_oid_$tag=$v"
> > break
> > fi
> > done
> > done
> > }
> >
> > test_oid () {
> > if test $# -gt 1
> > then
> > test_oid_cache <<-EOF
> > $*
> > EOF
> > fi
> > eval "echo \$test_oid_$1"
> > }
> > --- >8 ---
>
> I'd like to use this as a basis for my v2, but I would need your
> sign-off in order to do that. Would that be okay?You can have my sign-off for the code above.