Skip to content

Instantly share code, notes, and snippets.

@OrigamiEngineer
Forked from SpotlightKid/open-in-firefox.sh
Created September 19, 2020 17:51
Show Gist options
  • Save OrigamiEngineer/15de60e37a47fb7f08e63f66f2b24066 to your computer and use it in GitHub Desktop.
Save OrigamiEngineer/15de60e37a47fb7f08e63f66f2b24066 to your computer and use it in GitHub Desktop.
Open URL from Termux command line in Firefox Android browser
#!/bin/bash
#
# open-in-firefox.sh - open URL from Termux command line in Firefox Android browser
#
# Works with file:// URLs too, unlike with termux-open{-url}.
#
exec am start --user 0 -a android.intent.action.VIEW -n org.mozilla.firefox/.App -d "$1" >/dev/null
#!/bin/bash
#
# publish-sphinx-docs.sh - Generate HTML output from Sphinx ReST sources
# and open them for viewing in Firefox app
#
DESTDIR="/storage/emulated/0/Documents"
[ -n "$1" ]; cd "$1"
make html
mkdir -p "$DESTDIR"
rsync -rv --update _build/html/ "$DESTDIR"
open-in-firefox.sh "file://$DESTDIR/index.html"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment