-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for more firefox/xulrunner names
Pencil can now run on more branded firefox versions - added firefox-bin. Rewritten the binary, so that new ones can be easily added.
- Loading branch information
Showing
1 changed file
with
20 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
#!/bin/sh | ||
|
||
|
||
# Target for application ini | ||
APP_INI="/usr/share/evolus-pencil/application.ini" | ||
|
||
if [ -x /usr/bin/xulrunner ]; then | ||
# List of firefox binaries to search | ||
BINARIES="xulrunner iceweasel firefox firefox-bin" | ||
|
||
/usr/bin/xulrunner "$APP_INI" "$@" | ||
# Assembling run command | ||
RUN="" | ||
|
||
elif [ -x /usr/bin/iceweasel ]; then | ||
for BIN in $BINARIES; do | ||
BIN_PATH=$(which ${BIN} 2>/dev/null) | ||
|
||
/usr/bin/iceweasel --no-remote --app "$APP_INI" "$@" | ||
if [ "$?" == "0" ]; then | ||
OPTS="${APP_INI}" "$@" | ||
|
||
else | ||
if [ "${BIN}" != "xulrunner" ]; then | ||
OPTS="--app ${OPTS}" | ||
fi | ||
|
||
/usr/bin/firefox --no-remote --app "$APP_INI" "$@" | ||
RUN="${BIN_PATH} ${OPTS}" | ||
fi | ||
done | ||
|
||
if [ "${RUN}" == "" ]; then | ||
echo "You need to install firefox or xulrunner and have it in your PATH." | ||
exit 1; | ||
fi | ||
|
||
${RUN} |