bitwarden-ssh-agent/start.sh
2020-04-07 13:25:18 +01:00

15 lines
251 B
Bash
Executable file

#!/bin/bash
(
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cd $SCRIPTPATH
KEYS=$(/usr/bin/env python ssh.py)
IFS=';'
read -d '' -ra SPLITKEYS < <(printf '%s;\0' "$KEYS")
for i in ${SPLITKEYS[@]}
do
ssh-add - <<< "${i}"
done
)