Add support for Chrome Beta on macOS

This commit is contained in:
Ezekiel Templin 2021-01-08 19:11:24 -08:00
parent 6d65a48d4e
commit dfb9212ed2
No known key found for this signature in database
GPG key ID: 5399F2628ADDA365

View file

@ -6,8 +6,9 @@ if [[ "$#" -lt 1 || (
! ( ( "$1" == "firefox" && "$#" -eq 1 ) ||
( "$1" == "chrome" && "$#" -eq 2 && ${#2} -eq 32 ) ||
( "$1" == "vivaldi" && "$#" -eq 2 && ${#2} -eq 32 ) ||
( "$1" == "chromebeta" && "$#" -eq 2 && ${#2} -eq 32 ) ||
( "$1" == "chromium" && "$#" -eq 2 && ${#2} -eq 32 ) ) ) ]]; then
echo "Usage: $0 <chrome EXTENSION_ID | chromium EXTENSION_ID | vivaldi EXTENSION_ID | firefox>"
echo "Usage: $0 <chrome EXTENSION_ID | chromebeta EXTENSION_ID | chromium EXTENSION_ID | vivalidi EXTENSION_ID | firefox>"
exit 2
fi
@ -33,6 +34,8 @@ case "$OS $BROWSER" in
MANIFEST_LOCATION="$HOME/.config/vivaldi/NativeMessagingHosts";;
"Darwin chrome")
MANIFEST_LOCATION="$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts";;
"Darwin chromebeta")
MANIFEST_LOCATION="$HOME/Library/Application Support/Google/Chrome Beta/NativeMessagingHosts";;
"Darwin chromium")
MANIFEST_LOCATION="$HOME/Library/Application Support/Chromium/NativeMessagingHosts";;
esac
@ -43,7 +46,7 @@ APP_NAME="com.rsnous.tabfs"
EXE_PATH=$(pwd)/fs/tabfs
case "$BROWSER" in
chrome | chromium | vivaldi)
chrome | chromium | chromebeta | vivaldi)
EXTENSION_ID=$2
MANIFEST=$(cat <<EOF
{