mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
Fix shift error that shows up on Solaris. Get DEPTH with perl.
This commit is contained in:
parent
e79a8247b7
commit
01b91d73a8
@ -33,35 +33,41 @@ dist_bin=""
|
||||
# Running from dist/bin
|
||||
if [ -d components -a -d res ]
|
||||
then
|
||||
dist_bin="./"
|
||||
dist_bin="./"
|
||||
else
|
||||
# Running from source dir
|
||||
if [ -f Makefile.in ]
|
||||
then
|
||||
dist_bin=`grep -w DEPTH Makefile.in | grep -e "\.\." | awk -F"=" '{ print $2; }'`/dist/bin
|
||||
fi
|
||||
# Running from source dir
|
||||
if [ -f Makefile.in ]
|
||||
then
|
||||
depth=`perl -ne '/^DEPTH\s*=(.*)/ and print $1' Makefile.in`
|
||||
dist_bin=$depth/dist/bin
|
||||
fi
|
||||
fi
|
||||
|
||||
script_args=""
|
||||
|
||||
while [ -n "$(echo $1 | grep '^-')" ]
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
-h | --help)
|
||||
script_args="$script_args -h"
|
||||
;;
|
||||
|
||||
-g | --debug)
|
||||
script_args="$script_args -g"
|
||||
;;
|
||||
|
||||
-d | --debugger)
|
||||
script_args="$script_args -d $2"
|
||||
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
case $1 in
|
||||
-h | --help)
|
||||
script_args="$script_args -h"
|
||||
shift
|
||||
;;
|
||||
-g | --debug)
|
||||
script_args="$script_args -g"
|
||||
shift
|
||||
;;
|
||||
-d | --debugger)
|
||||
script_args="$script_args -d $2"
|
||||
shift 2
|
||||
;;
|
||||
-*)
|
||||
echo "Unknown option: $1" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
$dist_bin/run-mozilla.sh $script_args ./viewer ${1+"$@"}
|
||||
|
Loading…
Reference in New Issue
Block a user