summaryrefslogtreecommitdiffstats
path: root/update
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2018-04-17 21:08:18 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2018-04-17 21:08:18 +0200
commitecc4dac3779a7d7fdb40691e32cb54a2c137bf20 (patch)
tree249f7574cbd8ff8632238b60b4ae2a5fa2a9b5ff /update
parent5a619f8aa141485edeac706564568cf67057224a (diff)
downloadbin-ecc4dac3779a7d7fdb40691e32cb54a2c137bf20.zip
bin-ecc4dac3779a7d7fdb40691e32cb54a2c137bf20.tar.gz
update : setup ssh-agent if needed
Diffstat (limited to 'update')
-rwxr-xr-xupdate2
1 files changed, 2 insertions, 0 deletions
diff --git a/update b/update
index a0f88aa..f81c003 100755
--- a/update
+++ b/update
@@ -3,6 +3,8 @@ RESET="\033[0m"
RED="\033[0;31m"
CYAN="\033[0;36m"
+ssh-add -l | grep -q 'no identities' && ssh-add $(ls ~/.ssh/*.pub | sed 's/\.pub.*//g' | tr '\n' ' ')
+
if [ $# -lt 1 ]; then
echo "missing passwd" && exit 1
fi