~smoser/cirros/trunk.mkcabundle-in-bash

« back to all changes in this revision

Viewing changes to bin/mkcabundle

  • Committer: Scott Moser
  • Date: 2016-07-25 18:06:53 UTC
  • Revision ID: smoser@ubuntu.com-20160725180653-y34obg01wpbox1we
add a comment

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
process_certdata() {
27
27
    local in_cert=0 cur_cert="" line="" ret="" data=""
 
28
    # this reads from stdin and writes to stdout.
 
29
    # the format of the input is expected to be like 'certdata.txt'
 
30
    # primarily that means lines with 'CKA_VALUE MULTILINE_OCTAL'
 
31
    # and then payload of octal data until 'END'.
28
32
    while read -r line; do
29
33
        case "$line" in
30
34
            "# Certificate "*)
58
62
                eval set -- "${getopt_out}" ||
59
63
                { bad_Usage; return; }
60
64
 
61
 
        local cur="" next=""
62
 
        local input="" output=""
 
65
        local cur="" next="" input="" output=""
63
66
 
64
67
        while [ $# -ne 0 ]; do
65
68
                cur="$1"; next="$2";