From ec72705b8435c753bab064501bcade24badd7dd5 Mon Sep 17 00:00:00 2001 From: Jam Risser Date: Thu, 16 May 2019 02:45:10 -0500 Subject: [PATCH] Add support for Iridium (#67) --- Makefile | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++++ 2 files changed, 60 insertions(+) diff --git a/Makefile b/Makefile index cd47f51..7d844d3 100644 --- a/Makefile +++ b/Makefile @@ -219,6 +219,34 @@ hosts-brave-user: *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ esac +.PHONY: hosts-iridium +hosts-iridium: + @case $(OS) in \ + Linux) mkdir -p "/etc/iridium-browser/native-messaging-hosts/"; \ + ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "/etc/iridium-browser/native-messaging-hosts/$(APP_ID).json"; \ + [ -e "/etc/iridium-browser/native-messaging-hosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \ + ;; \ + Darwin) mkdir -p "/Library/Application Support/Iridium/NativeMessagingHosts/"; \ + ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "/Library/Application Support/Iridium/NativeMessagingHosts/$(APP_ID).json"; \ + [ -e "/Library/Application Support/Iridium/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \ + ;; \ + *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ + esac + +.PHONY: hosts-iridium-user +hosts-iridium-user: + @case $(OS) in \ + Linux|*BSD) mkdir -p "${HOME}/.config/iridium/NativeMessagingHosts/"; \ + ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/.config/iridium/NativeMessagingHosts/$(APP_ID).json"; \ + [ -e "${HOME}/.config/iridium/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \ + ;; \ + Darwin) mkdir -p "${HOME}/Library/Application Support/Iridium/NativeMessagingHosts/"; \ + ln -sfv "$(LIB_DIR)/browserpass/hosts/chromium/$(APP_ID).json" "${HOME}/Library/Application Support/Iridium/NativeMessagingHosts/$(APP_ID).json"; \ + [ -e "${HOME}/Library/Application Support/Iridium/NativeMessagingHosts/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \ + ;; \ + *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ + esac + .PHONY: hosts-firefox hosts-firefox: @case $(OS) in \ @@ -360,3 +388,31 @@ policies-brave-user: ;; \ *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ esac + +.PHONY: policies-iridium +policies-iridium: + @case $(OS) in \ + Linux) mkdir -p "/etc/opt/chrome/policies/managed/"; \ + ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "/etc/opt/chrome/policies/managed/$(APP_ID).json"; \ + [ -e "/etc/opt/chrome/policies/managed/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \ + ;; \ + Darwin) mkdir -p "/Library/Application Support/Chromium/policies/managed/"; \ + ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "/Library/Application Support/Chromium/policies/managed/$(APP_ID).json"; \ + [ -e "/Library/Application Support/Chromium/policies/managed/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \ + ;; \ + *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ + esac + +.PHONY: policies-iridium-user +policies-iridium-user: + @case $(OS) in \ + Linux|*BSD) mkdir -p "${HOME}/.config/iridium/policies/managed/"; \ + ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "${HOME}/.config/iridium/policies/managed/$(APP_ID).json"; \ + [ -e "${HOME}/.config/iridium/policies/managed/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \ + ;; \ + Darwin) mkdir -p "${HOME}/Library/Application Support/Iridium/policies/managed/"; \ + ln -sfv "$(LIB_DIR)/browserpass/policies/chromium/$(APP_ID).json" "${HOME}/Library/Application Support/Iridium/policies/managed/$(APP_ID).json"; \ + [ -e "${HOME}/Library/Application Support/Iridium/policies/managed/$(APP_ID).json" ] || echo "Error: the symlink points to a non-existent location" >&2; \ + ;; \ + *) echo "The operating system $(OS) is not supported"; exit 1 ;; \ + esac diff --git a/README.md b/README.md index 3f9aaba..fc9edb2 100644 --- a/README.md +++ b/README.md @@ -158,11 +158,13 @@ If you provided `PREFIX` and/or `DESTDIR` while running `make install`, remember | `make hosts-firefox-user` | Configure browserpass for Firefox browser, for the current user only | | `make hosts-chrome-user` | Configure browserpass for Google Chrome browser, for the current user only | | `make hosts-brave-user` | Configure browserpass for Brave browser, for the current user only | +| `make hosts-iridium-user` | Configure browserpass for Iridium browser, for the current user only | | `make hosts-vivaldi-user` | Configure browserpass for Vivaldi browser, for the current user only | | `sudo make hosts-chromium` | Configure browserpass for Chromium browser, system-wide | | `sudo make hosts-firefox` | Configure browserpass for Firefox browser, system-wide | | `sudo make hosts-chrome` | Configure browserpass for Google Chrome browser, system-wide | | `sudo make hosts-brave` | Configure browserpass for Brave browser, system-wide | +| `sudo make hosts-iridium` | Configure browserpass for Iridium browser, system-wide | | `sudo make hosts-vivaldi` | Configure browserpass for Vivaldi browser, system-wide | In addition, Chromium-based browsers support the following `make` goals: @@ -172,10 +174,12 @@ In addition, Chromium-based browsers support the following `make` goals: | `make policies-chromium-user` | Automatically install browser extension from Web Store for Chromium browser, for the current user only | | `make policies-chrome-user` | Automatically install browser extension from Web Store for Google Chrome browser, for the current user only | | `make policies-brave-user` | Automatically install browser extension from Web Store for Brave browser, for the current user only | +| `make policies-iridium-user` | Automatically install browser extension from Web Store for Iridium browser, for the current user only | | `make policies-vivaldi-user` | Automatically install browser extension from Web Store for Vivaldi browser, for the current user only | | `sudo make policies-chromium` | Automatically install browser extension from Web Store for Chromium browser, system-wide | | `sudo make policies-chrome` | Automatically install browser extension from Web Store for Google Chrome browser, system-wide | | `sudo make policies-brave` | Automatically install browser extension from Web Store for Brave browser, system-wide | +| `sudo make policies-iridium` | Automatically install browser extension from Web Store for Iridium browser, system-wide | | `sudo make policies-vivaldi` | Automatically install browser extension from Web Store for Vivaldi browser, system-wide | ## Building the app