Blame SOURCES/xulrunner.sh.in

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