Skip to content

Commit 28b8fd7

Browse files
committed
Update quick_install
1 parent e7363e8 commit 28b8fd7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

quick_install.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ set -o xtrace # trace execution
66
# Create ~/.ssh if not exists
77
mkdir -p ~/.ssh
88

9-
# # Add github's host key to known_hosts (if not yet)
10-
# if ! grep github.com ~/.ssh/known_hosts >/dev/null 2>&1; then
11-
# ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
12-
# fi
9+
# Add github's host key to known_hosts (if not yet)
10+
if ! grep github.com ~/.ssh/known_hosts >/dev/null 2>&1; then
11+
command -v ssh-keyscan >/dev/null &&
12+
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
13+
fi
1314

1415
# Clone repository (if not yet)
1516
if [ ! -d ~/.dotfiles ]; then
1617
# First try cloning via ssh (only works if owner of repo)
18+
GIT_TERMINAL_PROMPT=0 \
1719
git clone [email protected]:lainiwa/dotfiles.git ~/.dotfiles ||
1820
# Clone via https otherwise
1921
git clone https://github.com/lainiwa/dotfiles.git ~/.dotfiles

0 commit comments

Comments
 (0)