add install targets

This commit is contained in:
Andrejus
2020-03-25 19:57:24 +00:00
parent 826cc598b9
commit ae4fc2832c
19 changed files with 111 additions and 196 deletions

View File

@@ -1,22 +1,17 @@
#!/usr/bin/env bash
#
# After running this script:
# 1. ssh key exists
# 2. ssh dotfiles are symlinked
#
# 1. ssh key exists
ssh_target="$HOME/.ssh"
ssh_key="$ssh_target/id_rsa"
ssh_pub="$ssh_key.pub"
if [ ! -f "$ssh_key" ]; then
printf "generating ssh key...\n"
echo "generating ssh key..."
ssh-keygen -t rsa -b 4096 -f "$ssh_key"
fi
printf "ssh key exists\n"
echo "ssh key exists"
# 2. ssh dotfiles are symlinked
ssh_source="$dotfiles_dir/ssh"
link_folder "$ssh_source" "$ssh_target"
printf "ssh dotfiles are symlinked\n"
echo "ssh dotfiles are symlinked"
cat "$ssh_pub"