Группа :: Сети/Почта
Пакет: thunderbird
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: thunderbird-1.0-alt-script-fix.patch
--- mozilla/mail/app/mozilla.in.fix 2005-01-08 04:07:05 +0300
+++ mozilla/mail/app/mozilla.in 2005-01-08 04:12:23 +0300
@@ -76,60 +76,29 @@ moz_libdir=%MOZAPPDIR%
MRE_HOME=%MREDIR%
# Use run-mozilla.sh in the current dir if it exists
# If not, then start resolving symlinks until we find run-mozilla.sh
found=0
progname="$0"
curdir=`dirname "$progname"`
progbase=`basename "$progname"`
-run_moz="$curdir/run-mozilla.sh"
-if test -x "$run_moz"; then
- dist_bin="$curdir"
- found=1
-else
- here=`/bin/pwd`
- while [ -h "$progname" ]; do
- bn=`basename "$progname"`
- cd `dirname "$progname"`
- progname=`/bin/ls -l "$bn" | sed -e 's/^.* -> //' `
- if [ ! -x "$progname" ]; then
- break
- fi
- curdir=`dirname "$progname"`
- run_moz="$curdir/run-mozilla.sh"
- if [ -x "$run_moz" ]; then
- cd "$curdir"
- dist_bin=`pwd`
- found=1
- break
- fi
- done
- cd "$here"
-fi
-if [ $found = 0 ]; then
- # Check default compile-time libdir
- if [ -x "$moz_libdir/run-mozilla.sh" ]; then
- dist_bin="$moz_libdir"
- else
- echo "Cannot find mozilla runtime directory. Exiting."
- exit 1
- fi
-fi
+run_moz="$moz_libdir/run-mozilla.sh"
+dist_bin="$moz_libdir"
script_args=""
moreargs=""
debugging=0
MOZILLA_BIN="${progbase}-bin"
# The following is to check for a currently running instance.
# This is taken almost verbatim from the Mozilla RPM package's launch script.
MOZ_CLIENT_PROGRAM="$dist_bin/mozilla-xremote-client"
check_running() {
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" 'ping()' 2>/dev/null >/dev/null
+ "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" -u "$USER" 'ping()' 2>/dev/null >/dev/null
RETURN_VAL=$?
if [ $RETURN_VAL -eq 0 ]; then
echo 1
return 1
else
echo 0
return 0
fi
@@ -183,24 +152,24 @@ if [ $ALREADY_RUNNING -eq 1 ]; then
# Any command line args passed in?
if [ $# -gt 0 ]; then
# There were "some" command line args.
if [ ${_USE_EXIST} -eq 1 ]; then
# We should use an existing instance, as _USE_EXIST=$_USE_EXIST=-1
_open_type="window"
#_open_type="tab"
_remote_cmd="openURL(${_optLast} , new-${_open_type})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
+ "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" -u "$USER" "${_remote_cmd}"
unset _remote_cmd _open_type
exit $?
fi
else
# No command line args. Open new window/tab
#exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "xfeDoCommand(openBrowser)"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "xfeDoCommand(openInbox)"
+ "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" -u "$USER" "xfeDoCommand(openInbox)"
exit $?
fi
fi
# Default action - no running instance or _USE_EXIST (${_USE_EXIST}) ! -eq 1
########################################################################### Main
while [ $# -gt 0 ]
do