fix agent-logic
This commit is contained in:
parent
d74034b163
commit
bd519974ee
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue