3 # (C) Copyright 2004-2007 Shawn Betts
4 # (C) Copyright 2007 John J. Foerch
6 # Use, modification, and distribution are subject to the terms specified in the
11 ## Whether to build the xulapp. This is just a shortcut for developers and hackers.
18 ## Install prefix. Conkeror will be installed to $PREFIX/lib/conkeror and a
19 ## symlink to the stub binary will be placed in $PREFIX/bin/conkeror
23 while [[ "$1" = -* ]]; do
26 -prefix) PREFIX
="${2%/}" ; shift ;;
28 echo "Unrecognized option. Please read the source."
36 function assert_conkeror_src
() {
37 if [[ ! -e build.sh
]]; then
38 echo "The current directory does not appear to contain the Conkeror source code."
44 if [[ -n "$BUILD" ]]; then
45 ## -build has been requested.
46 ## assert we are in the conkeror source directory
51 ### conkeror.xulapp should be in the current directory
52 if [[ ! -e conkeror.xulapp
]]; then
53 echo "conkeror.xulapp not found. install cannot continue."
58 ### spawn-process-helper should be in the current directory
59 if [[ ! -e spawn-process-helper
]]; then
60 echo " spawn-process-helper not found. install cannot continue."
66 echo -n "Installing conkeror to $PREFIX/lib/conkeror ..."
67 xulrunner
--install-app conkeror.xulapp
"$PREFIX/lib/"
70 echo -n "Installing spawn-process-helper to $PREFIX/lib/conkeror ..."
71 cp spawn-process-helper
$PREFIX/lib
/conkeror
/
75 if [[ -e "$PREFIX/bin/conkeror" ]]; then
76 rm "$PREFIX/bin/conkeror"
78 echo -n "Creating symlink to stub binary in $PREFIX/bin ..."
79 pushd "$PREFIX/bin" > /dev
/null
80 ln -s ..
/lib
/conkeror
/conkeror conkeror
84 echo "Done. If you get an error that the correct GRE version"
85 echo "cannot be found, try one of the following commands:"
86 echo "for system-wide install: xulrunner --register-global"
87 echo "for single-user install: xulrunner --register-user"