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
21 PREFIX
=${PREFIX:-/usr/local}
23 while [[ "$1" = -* ]]; do
26 -prefix) PREFIX
="${2%/}" ; shift ;;
28 echo "Unrecognized option. Please read the source."
36 if [[ $?
!= 0 ]]; then
38 echo command failed
: "$@"
45 function assert_conkeror_src
() {
46 if [[ ! -e build.sh
]]; then
47 echo "The current directory does not appear to contain the Conkeror source code."
53 if [[ -n "$BUILD" ]]; then
54 ## -build has been requested.
55 ## assert we are in the conkeror source directory
60 ### conkeror.xulapp should be in the current directory
61 if [[ ! -e conkeror.xulapp
]]; then
62 echo "conkeror.xulapp not found. install cannot continue."
67 ### conkeror-spawn-helper should be in the current directory
68 if [[ ! -e conkeror-spawn-helper
]]; then
69 echo " conkeror-spawn-helper not found. install cannot continue."
75 echo -n "Installing conkeror to $PREFIX/lib/conkeror ..."
76 assert xulrunner
--install-app conkeror.xulapp
"$PREFIX/lib/"
78 echo -n "Installing conkeror-spawn-helper to $PREFIX/lib/conkeror ..."
79 cp conkeror-spawn-helper
$PREFIX/lib
/conkeror
/
83 if [[ -e "$PREFIX/bin/conkeror" ]]; then
84 rm "$PREFIX/bin/conkeror"
86 echo -n "Creating symlink to stub binary in $PREFIX/bin ..."
87 pushd "$PREFIX/bin" > /dev
/null
88 ln -s ..
/lib
/conkeror
/conkeror conkeror
92 echo "Done. If you get an error that the correct GRE version"
93 echo "cannot be found, try one of the following commands:"
94 echo "for system-wide install: xulrunner --register-global"
95 echo "for single-user install: xulrunner --register-user"