home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / doc / mozilla-thunderbird / mozilla-thunderbird-compose < prev    next >
Encoding:
Text File  |  2007-04-03  |  925 b   |  37 lines

  1. #!/bin/sh 
  2.  
  3. ##############################################################
  4. # Command: mozilla-thunderbird-compose <uri>
  5. # Options:     uri : <empty>
  6. #                  : mailto:name@some.tld
  7. #                  : mailto:name@some.tld?Subject=SubjectText
  8. #
  9. # Author: Alexander Sack <asac@debian.org>
  10. ##############################################################
  11.  
  12. print_usage() {
  13.    echo " Usage: mozilla-thunderbird-compose [options] mailto:url"
  14.    echo "    e.g. mozilla-thunderbird-compose mailto:somemail@someaddress.tld"
  15. }
  16.  
  17. _optOthers=
  18. _optLast=
  19. for i in "$@"; do
  20.    _optLast="${i}"
  21. done #last arg
  22.  
  23. for i in "$@"; do
  24.    # break if last
  25.    [ "$i" = "${_optLast}" ] && break
  26.  
  27.    # omit -compose
  28.    [ "$i" != "'-compose'" ] && _optOthers="${_optOthers} ${i}"
  29. done #others arg
  30.  
  31. if test "$_optLast" = "-?" -o "$_optLast" = "--help"; then
  32.   print_usage
  33.   exit 1
  34. fi
  35.  
  36. /usr/bin/mozilla-thunderbird ${_optOthers} -compose $_optLast
  37.