Skip to content
  • Carsten Schoenert's avatar
    tb-helper: pass arguments correctly through tb call · c2a1d77d
    Carsten Schoenert authored
    Given arguments that are not targeted for the wrapper script itself
    needs to through the script and passed as given to the final call of the
    Thunderbird binary. This needs the usage of the extra function call
    'eval' to expand the given arguments first.
    
    We also parse the arguments as a list instead on based the given
    argument count. This saves a little bit time, the can loop directly
    through the elements of list.
    While looping through the arguments we search for escaped arguments and
    "restore" this escaping as it is removed bx the shell. Doing this also
    for arguments that containing some other special characters like equal
    signs and commas. Some possible arguments for the thunderbird binary use
    them. For example
    
      thunderbird -compose "to='recipient@tld.org','attachment=some.file'"
    
    And doing some more escaping of used variables inside the script.
    
    Closes: #855334
    c2a1d77d