fix agent-logic

This commit is contained in:
Rasmus Moorats 2020-02-12 14:37:04 +02:00
parent d74034b163
commit bd519974ee

View file

@ -34,9 +34,10 @@ for key in "$@"; do
KEYFP=$(ssh-keygen -lf "$key")
# if our key is already added, don't operate on it
if echo "$KEYS" | grep -v "$KEYFP" > /dev/null; then
echo "$KEYS" | grep "$KEYFP" -q
if [[ "$?" -ne "0" ]]; then
ssh-add -q "$key" > /dev/null
fi
done
exit 0
exit 0