fix: wsl browserpass-native

This commit is contained in:
Klesh Wong 2021-10-05 23:32:57 +08:00
parent 454c34712d
commit b801eac38c
2 changed files with 15 additions and 8 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
case $(uname -r) in
*microsoft*) powershell.exe -noprofile start-process "'$@'";;
*microsoft*|*Microsoft*) powershell.exe -noprofile start-process "'$@'";;
*)
if command -v exo-open >/dev/null 2>&1; then
exo-open "$@" 1>/dev/null 2>&1

View File

@ -14,7 +14,7 @@ mkdir -p "$GNUPG"
# install pass
case "$PM" in
apt)
sudo apt install -y pass webext-browserpass
sudo apt install -y pass
if [ -n "$WSL" ]; then
PINENTRY=$PDIR/bin/pinentry-wsl-ps1.sh
BROWSERPASS_NATIVE="$(wsl-win-path.sh %USERPROFILE%)/browser-wsl.bat"
@ -30,12 +30,6 @@ case "$PM" in
sudo pacman -S --noconfirm --needed \
go \
browserpass
# install browserpass-native
intorepo https://github.com/browserpass/browserpass-native.git "$DIR/repos/browserpass-native"
make configure
make
sudo make install
exitrepo
;;
esac
@ -46,6 +40,19 @@ default-cache-ttl 28800
max-cache-ttl 28800
EOF
# install browserpass-native
if [ -n "$WSL" ]; then
echo "Please download browserpass-native for windows 64 and extract it to /usr/local/bin"
x-open https://github.com/browserpass/browserpass-native/releases/latest
else
intorepo https://github.com/browserpass/browserpass-native.git "$DIR/repos/browserpass-native"
make configure
make
sudo make install
exitrepo
fi
# enable browser-native for google-chrome
#make -C /usr/lib/browserpass hosts-chrome-user