Re: [PATCH 01/10] t: add tool to translate hash-related values
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Jul 24, 2018, 22:17 UTC
- Message-ID
- <20180724221712.GJ18502@genre.crustytoothpaste.net>
- In-Reply-To
- <20180611074743.GA24066@flurp.local>
On Mon, Jun 11, 2018 at 03:47:43AM -0400, Eric Sunshine wrote:
Show 36 quoted lines
> Here's what I had envisioned when reading your emails about OID lookup
> table functionality:
>
> --- >8 ---
> test_detect_hash () {
> test_hash_algo=...
> }
>
> 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?
-- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204