From a814bc8eafd1e2aa35b00e26012416475fc6f0b5 Mon Sep 17 00:00:00 2001 From: Joao Jacome Date: Sat, 7 Mar 2020 17:41:19 +0000 Subject: [PATCH] fix for multiple ssh keys --- start.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/start.sh b/start.sh index f98a366..92cbdb7 100755 --- a/start.sh +++ b/start.sh @@ -1,3 +1,12 @@ -#!/bin/sh +#!/bin/bash +( KEYS=$(/usr/bin/env python ssh.py) -ssh-add - <<< "${KEYS}" +IFS=';' +read -d '' -ra SPLITKEYS < <(printf '%s;\0' "$KEYS") + +for i in ${SPLITKEYS[@]} +do + ssh-add - <<< "${i}" +done + +) \ No newline at end of file