Skip to content
This repository was archived by the owner on May 27, 2019. It is now read-only.

Add Brave as an install target #295

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ Linux)
TARGET_DIR_CHROMIUM="/etc/chromium/native-messaging-hosts"
TARGET_DIR_FIREFOX="/usr/lib/mozilla/native-messaging-hosts"
TARGET_DIR_VIVALDI="/etc/chromium/native-messaging-hosts"
TARGET_DIR_BRAVE="/etc/opt/chrome/native-messaging-hosts"
else
TARGET_DIR_CHROME="$HOME/.config/google-chrome/NativeMessagingHosts"
TARGET_DIR_CHROMIUM="$HOME/.config/chromium/NativeMessagingHosts"
TARGET_DIR_FIREFOX="$HOME/.mozilla/native-messaging-hosts"
TARGET_DIR_VIVALDI="$HOME/.config/vivaldi/NativeMessagingHosts"
TARGET_DIR_BRAVE="$HOME/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts"
fi
;;
Darwin)
Expand All @@ -44,11 +46,13 @@ Darwin)
TARGET_DIR_CHROMIUM="/Library/Application Support/Chromium/NativeMessagingHosts"
TARGET_DIR_FIREFOX="/Library/Application Support/Mozilla/NativeMessagingHosts"
TARGET_DIR_VIVALDI="/Library/Application Support/Vivaldi/NativeMessagingHosts"
TARGET_DIR_BRAVE="/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts"
else
TARGET_DIR_CHROME="$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts"
TARGET_DIR_CHROMIUM="$HOME/Library/Application Support/Chromium/NativeMessagingHosts"
TARGET_DIR_FIREFOX="$HOME/Library/Application Support/Mozilla/NativeMessagingHosts"
TARGET_DIR_VIVALDI="$HOME/Library/Application Support/Vivaldi/NativeMessagingHosts"
TARGET_DIR_BRAVE="$HOME/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts"
fi
;;
OpenBSD)
Expand All @@ -61,6 +65,7 @@ OpenBSD)
TARGET_DIR_CHROMIUM="$HOME/.config/chromium/NativeMessagingHosts"
TARGET_DIR_FIREFOX="$HOME/.mozilla/native-messaging-hosts"
TARGET_DIR_VIVALDI="$HOME/.config/vivaldi/NativeMessagingHosts"
TARGET_DIR_BRAVE="$HOME/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts"
;;
FreeBSD)
HOST_FILE="$BIN_DIR/browserpass-freebsd64"
Expand All @@ -72,6 +77,7 @@ FreeBSD)
TARGET_DIR_CHROMIUM="$HOME/.config/chromium/NativeMessagingHosts"
TARGET_DIR_FIREFOX="$HOME/.mozilla/native-messaging-hosts"
TARGET_DIR_VIVALDI="$HOME/.config/vivaldi/NativeMessagingHosts"
TARGET_DIR_BRAVE="$HOME/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts"
;;
*)
echo "$OPERATING_SYSTEM is not supported"
Expand All @@ -92,7 +98,8 @@ if [ -z "$BROWSER" ]; then
echo "2) Chromium"
echo "3) Firefox"
echo "4) Vivaldi"
echo -n "1-4: "
echo "5) Brave"
echo -n "1-5: "
read BROWSER
echo ""
fi
Expand All @@ -115,8 +122,12 @@ case $BROWSER in
BROWSER_NAME="Vivaldi"
TARGET_DIR="$TARGET_DIR_VIVALDI"
;;
5|[Bb]rave)
BROWSER_NAME="Brave"
TARGET_DIR="$TARGET_DIR_BRAVE"
;;
*)
echo "Invalid selection. Please select 1-4 or one of the browser names."
echo "Invalid selection. Please select 1-5 or one of the browser names."
exit 1
;;
esac
Expand Down