Skip to content

Commit

Permalink
Support for more firefox/xulrunner names
Browse files Browse the repository at this point in the history
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
just-paja committed Apr 13, 2015
1 parent aa66a7d commit b321547
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions build/Linux/pencil
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}

0 comments on commit b321547

Please sign in to comment.