Skip to content

Commit 3b031dc

Browse files
chore: update ssh agent script
1 parent e736ab0 commit 3b031dc

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

scripts/ssh-add-key.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#!/usr/bin/env bash
22

3-
eval "$(ssh-agent)"
4-
ssh-add "$1"
3+
if [[ "$1" != "" ]]; then
4+
eval "$(ssh-agent)"
5+
ssh-add "$1"
6+
fi
7+
8+
echo -e "pass your private ssh-key as an argument:
9+
\n
10+
./ssh-add-key.sh ~/.ssh/id_ed25519"
11+

0 commit comments

Comments
 (0)