Blame SOURCES/xulrunner.sh.in

8acfe1
#!/bin/sh
8acfe1
#
8acfe1
# The contents of this file are subject to the Netscape Public
8acfe1
# License Version 1.1 (the "License"); you may not use this file
8acfe1
# except in compliance with the License. You may obtain a copy of
8acfe1
# the License at http://www.mozilla.org/NPL/
8acfe1
#
8acfe1
# Software distributed under the License is distributed on an "AS
8acfe1
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
8acfe1
# implied. See the License for the specific language governing
8acfe1
# rights and limitations under the License.
8acfe1
#
8acfe1
# The Original Code is mozilla.org code.
8acfe1
#
8acfe1
# The Initial Developer of the Original Code is Netscape
8acfe1
# Communications Corporation.  Portions created by Netscape are
8acfe1
# Copyright (C) 1998 Netscape Communications Corporation. All
8acfe1
# Rights Reserved.
8acfe1
#
8acfe1
# Contributor(s): 
8acfe1
#
8acfe1
8acfe1
## 
8acfe1
## Usage:
8acfe1
##
8acfe1
## $ xulrunner
8acfe1
##
8acfe1
## This script is meant to run a xulrunner program from the xulrunner
8acfe1
## rpm installation.
8acfe1
##
8acfe1
8acfe1
cmdname=`basename $0`
8acfe1
8acfe1
##
8acfe1
## Variables
8acfe1
##
8acfe1
XUL_ARCH=$(uname -m)
8acfe1
case $XUL_ARCH in
8acfe1
	x86_64 | ia64 | s390 )
8acfe1
		XUL_LIB_DIR="/usr/lib64"
8acfe1
		SECONDARY_LIB_DIR="/usr/lib"
8acfe1
		;;
8acfe1
	* )
8acfe1
		XUL_LIB_DIR="/usr/lib"
8acfe1
		SECONDARY_LIB_DIR="/usr/lib64"
8acfe1
		;;
8acfe1
esac
8acfe1
8acfe1
if [ ! -x $XUL_LIB_DIR/xulrunner/xulrunner ]; then
8acfe1
    if [ ! -x $SECONDARY_LIB_DIR/xulrunner/xulrunner ]; then
8acfe1
	echo "Error: $XUL_LIB_DIR/xulrunner/xulrunner not found"
8acfe1
	if [ -d $SECONDARY_LIB_DIR ]; then
8acfe1
	    echo "       $SECONDARY_LIB_DIR/xulrunner/xulrunner not found"
8acfe1
	fi
8acfe1
	exit 1
8acfe1
    fi
8acfe1
    XUL_LIB_DIR="$SECONDARY_LIB_DIR"
8acfe1
fi
8acfe1
XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner"
8acfe1
XUL_PROGRAM="$XUL_DIST_BIN/xulrunner"
8acfe1
8acfe1
exec $XUL_PROGRAM "$@"