зеркало из https://github.com/mozilla/gecko-dev.git
Resolve symlinks as necessary to allow run-mozilla.sh to be called correctly.
Bug #57866 r=bryner a=asa
This commit is contained in:
Родитель
d3ddba1f5a
Коммит
7a5d757e23
|
@ -16,7 +16,7 @@
|
||||||
# Reserved.
|
# Reserved.
|
||||||
#
|
#
|
||||||
|
|
||||||
## $Id: mozilla,v 1.11 2001/11/03 05:05:47 seawood%netscape.com Exp $
|
## $Id: mozilla,v 1.12 2002/03/05 08:43:53 seawood%netscape.com Exp $
|
||||||
##
|
##
|
||||||
## Usage:
|
## Usage:
|
||||||
##
|
##
|
||||||
|
@ -32,7 +32,43 @@
|
||||||
#uncomment for debugging
|
#uncomment for debugging
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
dist_bin=`dirname $0`
|
#moz_libdir=@libdir@/mozilla
|
||||||
|
|
||||||
|
# honor MOZILLA_FIVE_HOME if it's there
|
||||||
|
if [ -n "$MOZILLA_FIVE_HOME" ] ; then
|
||||||
|
dist_bin="$MOZILLA_FIVE_HOME"
|
||||||
|
elif [ -d "$moz_libdir" ]; then
|
||||||
|
dist_bin=$moz_libdir
|
||||||
|
else
|
||||||
|
# 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`
|
||||||
|
here=`/bin/pwd`
|
||||||
|
until [ $found != 0 -a -L "$progname" ]; do
|
||||||
|
run_moz="$curdir/run-mozilla.sh"
|
||||||
|
if [ -x $run_moz ]; then
|
||||||
|
dist_bin=$curdir
|
||||||
|
found=1
|
||||||
|
else
|
||||||
|
bn=`basename "$progname"`
|
||||||
|
cd `dirname "$progname"`
|
||||||
|
progname=`/bin/ls -l "$bn" |sed -e 's/^.* -> //' `
|
||||||
|
if [ ! -x "$progname" ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
curdir=`dirname $progname`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cd $here
|
||||||
|
if [ $found = 0 ]; then
|
||||||
|
echo "Cannot find mozilla runtime directory. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
script_args=""
|
script_args=""
|
||||||
moreargs=""
|
moreargs=""
|
||||||
debugging=0
|
debugging=0
|
||||||
|
|
Загрузка…
Ссылка в новой задаче