-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathboot.sh
More file actions
31 lines (21 loc) · 683 Bytes
/
boot.sh
File metadata and controls
31 lines (21 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Boot up github shell access for Windows WSL/Ubuntu.
#!/bin/bash
private_key_location=~/.ssh/github_rsa # Change this location to where your file is located.
verbose=$1
echo 'Starting...'
if [ "$1" = "-v" ]; then
echo 'Booting up ssh-agent...'
fi
eval `ssh-agent -s`
# ssh_agent_running=$(ssh-agent -s)
if [ "$1" = "-v" ]; then
echo 'ssh-agent started with output:' $ssh_agent_running
echo 'Adding private key to ssh-agent...'
fi
ssh_add_result=$(ssh-add $private_key_location)
if [ "$1" = "-v" ]; then
echo 'ssh-agent started with output:' $ssh_agent_running
echo 'Adding private key to ssh-agent...'
echo 'Command result: '$ssh_add_result
fi
echo 'Completed.'