summaryrefslogtreecommitdiff
path: root/qutebrowser-from-source
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser-from-source')
-rwxr-xr-xqutebrowser-from-source44
1 files changed, 44 insertions, 0 deletions
diff --git a/qutebrowser-from-source b/qutebrowser-from-source
new file mode 100755
index 0000000..b856e07
--- /dev/null
+++ b/qutebrowser-from-source
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# Wrapper for building/running qutebrowser from source
+#
+# Since it's already avaiable in most distros (like Debian), you
+# might be interested in the official builds.
+#
+
+if [ "$1" != "update" ] && [ -x "$HOME/apps/qutebrowser/dist/.venv/bin/python3" ]; then
+ # See http://qutebrowser.org/doc/install.html#tox
+ #export LD_LIBRARY_PATH=/usr/lib/openssl-1.0
+ #export LD_LIBRARY_PATH=/usr/lib/`arch`-linux-gnu/openssl-1.0.2
+ OPTS="--qt-flag disable-reading-from-canvas"
+ source `dirname $0`/lib/qutebrowser-exec
+ $HOME/apps/qutebrowser/dist/.venv/bin/python3 -m qutebrowser $OPTS "$@"
+else
+ # Go to project folder
+ cd `dirname $0`
+
+ # Grab quebrowser source
+ git submodule update --init
+
+ # Check for tox
+ #if ! which tox &> /dev/null; then
+ # sudo apt install -y tox
+ #fi
+
+ # Build qutebrowser
+ #cd dist &> /dev/null && tox -r -e mkvenv-pypi
+ cd dist &> /dev/null && python3 scripts/mkvenv.py
+
+ # Check for doc builder
+ if ! dpkg-query -W -f='${Status}' asciidoc | grep -q '^install ok'; then
+ sudo apt install -y --no-install-recommends asciidoc source-highlight
+ fi
+
+ # Build docs
+ python3 scripts/asciidoc2html.py
+
+ # Run this script again
+ if [ "$1" != "update" ]; then
+ $0 "$@"
+ fi
+fi