зеркало из https://github.com/mozilla/pjs.git
Fix shift error that shows up on Solaris. Get DEPTH with perl.
This commit is contained in:
Родитель
2177440c9e
Коммит
f62e194601
|
@ -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+"$@"}
|
||||
|
|
Загрузка…
Ссылка в новой задаче