From cc821fc2a3674dcd7b4a73183fe156d3f8ef0016 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 16 Apr 2019 10:28:17 -0400 Subject: [PATCH] [provisioning] Add browserpass --- recipes/browserpass | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 recipes/browserpass diff --git a/recipes/browserpass b/recipes/browserpass new file mode 100644 index 0000000..f5f251e --- /dev/null +++ b/recipes/browserpass @@ -0,0 +1,28 @@ +#!/bin/bash +# Description: A browser plugin for the pass password store +set -e + +function _browserpass { + local browser=$1 + local _prefix=/usr/lib/browserpass + case $_PLATFORM in + darwin) + _prefix=/usr/local/opt/browserpass + ;; + esac + _run "[browserpass] Installing native messaging host to $browser" \ + make PREFIX=$_prefix hosts-$browser-user \ + -f $_prefix/lib/browserpass/Makefile +} + +case $_PLATFORM in + darwin) + _recipe brew + + _brew_tap amar1729/formulae + _brew browserpass + + test -e /Applications/Google\ Chrome.app && _browserpass chrome + test -e /Applications/Firefox.app && _browserpass firefox + ;; +esac