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 2 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-Beta/NativeMessagingHosts"
Copy link
Member

@maximbaz maximbaz Oct 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also find out locations for Darwin? I assume OpenBSD and FreeBSD will use the same path as Linux.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. I have updated the script accordingly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks man! I'll make sure to ping you when I get to merging this in v3.

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-Beta/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-Beta/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-Beta/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-Beta/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