--- 2003-04-10-00/moz Thu Apr 10 00:06:54 2003 +++ latest/moz Thu Apr 10 07:47:28 2003 @@ -1,11 +1,11 @@ #!/bin/sh appname=`basename "$0"` - ver="0.2.2b+.2003041000" + ver="0.2.2RC1.2003041007" copy="2002, 2003" mail="PointedEars@gmx.de" mail_feedback="bug-moz@PointedEars.de" # ---------------------------------------------------------------------------- - # moz 0.2.2b+ -- Mozilla process manager + # moz 0.2.2 -- Mozilla Process Manager # Copyright (C) 2002, 2003 Thomas Lahn # # This program is free software; you can redistribute it and/or modify @@ -50,7 +50,6 @@ mail_feedback="bug-moz@PointedEars.de" # * `-m' allows to open new Compose window with predefined `To:' field # * `-i' opens a new MailNews window # * `-c' opens a new Compose window with empty `To:' field - # * L10n: English and German (using macro function) # * Send error messages to stderr # * Fixed function-in-statement-bug on `sh' (@IRIX) # * Support SysV compliant `ps' calls (@IRIX) @@ -75,18 +74,22 @@ mail_feedback="bug-moz@PointedEars.de" # # See the ChangeLog text file for further information. # - # TO DO (0.2.2 release, scheduled in first week of April 2003) + # TO DO (0.2.2 RC1, scheduled 2003-04-14) # # * POSIX conform parsing of options and arguments (incomplete) + # * L10n: English and German (using macro function) (incomplete) # * `-M', `--mozilla': Support other programs similar to Mozilla like Phoenix + # (incomplete) # * `-C', `--command' options to execute arbitrary Mozilla commands # * Cosmetics: # - More modular code (incomplete) # # TO DO (later): - # + # # * New option to call Mozilla if and only if it is not running # + # See the ROADMAP text file for further information. + # # ---------------------------------------------------------------------------- function L { @@ -97,9 +100,9 @@ function L { } function Title { - echo "\ - ${extd}moz $ver -- "`L "Mozilla process manager" "Manager für \ - Mozilla-Prozesse"`"${norm} + echo " + ${extd}moz $ver -- "`L "Mozilla Process Manager" \ + "Mozilla Prozess-Manager"`"${norm} Copyright (C) $copy Thomas Lahn <$mail> "`L "Distributed under the terms of the" \ "Veröffentlicht unter den Bedingungen der"`" GNU General Public License \ @@ -162,7 +165,7 @@ L "Display this help and exit." "Anzeige echo -n " ${extd}-V${norm}, ${extd}--version${norm} " L "Display version information and exit." \ "Anzeige der Version und beenden." | $fold - + echo -n " ${extd}-M${norm}, ${extd}--mozilla${norm} " L "Specifies how to run Mozilla. " \ "Definiert, wie Mozilla gestartet werden soll." | $fold @@ -250,7 +253,7 @@ L "\ "\ diese Option wird möglicherweise in zukünftigen Versionen nicht mehr verfügbar sein." | $fmt - + echo -n " ${extd}-w${norm}, ${extd}--win${norm} " L "Show the resource(s) specified by URI in a new browser" \ "Zeigt die mit URI angegebene(n) Ressource(n) in" | $fold @@ -263,7 +266,7 @@ L "\ wird der Inhalt des aktuellen Fensters/Tabs ersetzt. Ressourcen mit \`mailto:'-URIs erzeugen jedoch immer ein neues Fenster für die Mailbearbeitung." | $fmt - + echo -n " ${extd}-t${norm}, ${extd}--tab${norm} " L "Show the resource(s) specified by URI in a new browser tab." \ "Zeigt die mit URI angegebene(n) Ressource(n) in einem" | $fold @@ -278,7 +281,7 @@ L "\ des aktuellen Fensters/Tabs ersetzt. Ressourcen mit \`mailto:'-URIs erzeugen jedoch immer ein neues Fenster für die Mailbearbeitung." | $fmt - + echo -n " URI " L "The URI(s) of the resource(s) to display. If not provided" \ "URI(s) der anzuzeigenden Ressource(n). Wenn nicht" | $fold @@ -302,7 +305,7 @@ L "\ angezeigt, falls nicht anders mit \`${extd}-t${norm}' oder\ durch einen \`mailto:'-URI festgelegt." | $fmt - + echo -n " ${extd}-${norm} " L "(Re)start Mozilla with a blank page (or home page in a" \ "(Neu)start von Mozilla mit einer leeren Seite (bzw." | $fold @@ -321,10 +324,10 @@ options and is especially useful \`${extd}-t${norm}' und ist besonders nützlich in \ Verbindung mit \`${extd}-T${norm}' oder \`${extd}-k${norm}'." | $fmt - + echo -n " ${extd}-m${norm}, ${extd}--mailto${norm} " - L "Pops up the mail dialog." "Zeigt den Mail-Dialog an." | $fold - + L "Pop up the mail dialog." "Öffnet ein neues Fenster zum Verfassen einer E-Mail." | $fold + echo -n " ADDRESS " L "If left out, the \`To:' field is empty. Given one or more" \ "Wenn dieses Argument ausgelassen wird, ist das Feld" | $fold @@ -335,18 +338,18 @@ L "\ \`An:' (\`To:') leer. Werden eine oder mehr durch Komma getrennte Adressen angegeben, so stehen diese zunächst im Feld \`An:'." | $fmt - - + + echo -n " ${extd}-i${norm}, ${extd}--inbox${norm} " - L "Opens a new Mail & Newsgroups window." \ + L "Open a new Mail & Newsgroups window." \ "Öffnet ein neues Fenster für Mail & Newsgroups." | $fold - + echo -n " ${extd}-c${norm}, ${extd}--compose${norm} " - L "Opens a new Message Compose window. + L "Open a new Message Compose window. Same as \`${extd}-m${norm}' without ADDRESS." \ "Öffnet ein neues Fenster zum Verfassen von Mails/News. Wie \`${extd}-m${norm}' ohne ADDRESS." | $fold - + echo -n " ${extd}-C${norm}, ${extd}--command${norm} " L "Execute arbitrary Mozilla COMMAND. $future" \ "Beliebigen Mozilla-Befehl COMMAND ausführen. @@ -359,12 +362,12 @@ $(L "\ Note that the long options are not available on this system, so you must use the short options instead. Also, optional arguments are not supported, so if you do not pass an argument to an option, you must - use '' instead." \ + use \'\' instead." \ "\ Beachten Sie, dass die langen Optionen auf diesem System nicht verfügbar sind, so dass Sie die kurzen Optionen verwenden müssen. Weiterhin werden optionale Argumente nicht unterstützt. Wenn Sie ein optionales Argument - nicht angeben, müssen Sie stattdessen '' angeben." | $fmt)" + nicht angeben, müssen Sie stattdessen \'\' angeben." | $fmt)" _XPG=0 fi echo @@ -611,6 +614,13 @@ if [ $COLUMNS -ne 80 ]; then # output is fi fi + # L10n + lg="" + test -n "$LANG" && lg=`echo $LANG | sed 's/_.*[.].*//' 2>/dev/null` + test -z "$lg" && lg=`echo $LC_CTYPE | sed 's/_.*//' 2>/dev/null` + + Title + # Note that we use `"$@"' to let each command-line parameter expand to a # separate word. The quotes around `$@' are essential! # We need `tmp' as the `eval set --' would nuke the return value of getopt. @@ -633,12 +643,6 @@ fi getopt_exit_code=$? help=0 verbose=0 - - # L10n - lg="" - test -n "$LANG" && lg=`echo $LANG | sed 's/_.*[.].*//' 2>/dev/null` - test -z "$lg" && lg=`echo $LC_CTYPE | sed 's/_.*//' 2>/dev/null` - version=0 mozilla="mozilla" term="" @@ -680,16 +684,13 @@ if [ $getopt_exit_code -eq 0 ]; then else echo "getopt exited: $getopt_exit_code " >&2 - if [ $getopt_exit_code -eq 1 ]; then + if [ $getopt_exit_code -eq 1 ] || [ $getopt_exit_code -eq 2 ]; then help=1 else exit $getopt_exit_code fi fi - test $version -eq 0 && echo - Title - test $help -eq 1 && help && test -n "$1" && shift echo `L "Send suggestions and bug reports to" \ @@ -706,8 +707,6 @@ if [ "$term" = "t" ] || [ "$term" = "k" test "$term" = "k" && sig=-9 KillMoz test $? -ne 0 && $sig -eq -9 && KillMoz $sig - shift - test -z "$1" && echo && exit 0 fi # check for list