Skip to content

Commit c2225c0

Browse files
committed
Indent ssh output
1 parent 1fafb87 commit c2225c0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bin/compile

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

3+
function indent() {
4+
c='s/^/ /'
5+
case $(uname) in
6+
Darwin) sed -l "$c";;
7+
*) sed -u "$c";;
8+
esac
9+
}
10+
311
env_dir=$3
412
ssh_key="$(cat $env_dir/SSH_KEY)"
513

@@ -8,7 +16,7 @@ if [ "$ssh_key" != "" ]; then
816

917
mkdir "$HOME/.ssh"
1018
echo "$ssh_key" | base64 --decode > "$HOME/.ssh/id_rsa"
11-
ssh -oStrictHostKeyChecking=no -T git@github.com
19+
ssh -oStrictHostKeyChecking=no -T git@github.com 2>&1 | indent
1220
exit 0
1321
else
1422
echo "-----> No SSH private key"

0 commit comments

Comments
 (0)