|
|
@@ -36,9 +36,10 @@ opt_t=no
|
|
|
opt_r=""
|
|
|
while [ ".$1" != . ]; do
|
|
|
case $1 in
|
|
|
- -v|--verbose ) opt_v=yes; shift ;;
|
|
|
- -w|--window ) opt_w=yes; shift ;;
|
|
|
- -t|--tab ) opt_t=yes; shift ;;
|
|
|
+ -m|-mail|--mail ) opt_m=yes; shift ;;
|
|
|
+ -v|--verbose ) opt_v=yes; shift ;;
|
|
|
+ -w|--window ) opt_w=yes; shift ;;
|
|
|
+ -t|--tab ) opt_t=yes; shift ;;
|
|
|
-r|-remote|--remote ) opt_r="$2"; shift; shift ;;
|
|
|
-* ) echo "$0:ERROR: invalid option \"$1\"" 1>&2; exit 1 ;;
|
|
|
* ) break ;;
|
|
|
@@ -66,6 +67,18 @@ if [ ".$opt_r" != . ]; then
|
|
|
exec $mozilla_bin -remote "$opt_r"
|
|
|
fi
|
|
|
|
|
|
+# special case of direct email option
|
|
|
+if [ ".$opt_m" != . ]; then
|
|
|
+ $mozilla_bin -remote "ping()" >/dev/null 2>&1
|
|
|
+ if [ $? -eq 0 ]; then
|
|
|
+ verbose "$mozilla_bin -remote \"xfeDoCommand(openInbox)\""
|
|
|
+ $mozilla_bin -remote "xfeDoCommand(openInbox)"
|
|
|
+ else
|
|
|
+ verbose "exec: $mozilla_bin -mail"
|
|
|
+ exec $mozilla_bin -mail
|
|
|
+ fi
|
|
|
+fi
|
|
|
+
|
|
|
# determine Mozilla run-time status
|
|
|
$mozilla_bin -remote "ping()" >/dev/null 2>&1
|
|
|
if [ $? -eq 0 ]; then
|