22 lines
339 B
Bash
Executable File
22 lines
339 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
BRIDGE="${BRIDGE:-/usr/bin/protonmail-bridge}"
|
|
|
|
|
|
gpg --generate-key --batch gpg-keygen-params.txt
|
|
pass init proton
|
|
|
|
mkfifo input
|
|
sleep infinity > input &
|
|
$BRIDGE --cli < input &
|
|
bridge_pid=$!
|
|
|
|
echo "login" > input
|
|
echo "$BRIDGE_USER" > input
|
|
echo "$BRIDGE_PASS" > input
|
|
echo "info" > input
|
|
|
|
wait $!
|
|
|