From 091ba179a178550596c0647629bff10c7387bcb7 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 7 Jun 2018 12:17:20 -0300 Subject: Tridactyl support for firefox-dev --- firefox-dev | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/firefox-dev b/firefox-dev index d1c8134..2ff555a 100755 --- a/firefox-dev +++ b/firefox-dev @@ -3,6 +3,9 @@ # Wrapper around firefox # +# Parameters +DIRNAME="`dirname $0`" + if which flatpak &> /dev/null; then if ! flatpak list | grep -q ^org.mozilla.FirefoxDevEdition; then # Install @@ -11,6 +14,19 @@ if which flatpak &> /dev/null; then # Run this script again $0 else + # Check and set tridactyl + if [ -e "$DIRNAME/../tridactyl/native/tridactyl.json" ]; then + native="$HOME/.mozilla/native-messaging-hosts/" + + if [ ! -e "$native/tridactyl.json" ]; then + mkdir -p $native + + tridactyl="`cd $DIRNAME/../tridactyl/native/ &> /dev/null && pwd`" + cp $tridactyl/tridactyl.json $native + sed -i -e "s|REPLACE_ME_WITH_SED|$tridactyl/native_main.py|g" $native/tridactyl.json + fi + fi + flatpak run org.mozilla.FirefoxDevEdition & # Woraround while we dont fix this issue -- cgit v1.2.3