-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·38 lines (31 loc) · 1005 Bytes
/
install.sh
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
32
33
34
35
36
37
38
#!/usr/bin/env bash
set -e
git submodule update --init --recursive
touch ~/.credentials.sh
function replace() {
path=$1
rm -rf ~/"$path" > /dev/null 2>&1
echo "removed ~/$path"
ln -sf ~/dotfiles/"$path" ~/"$path"
echo "symlinked $path"
}
if [[ "$OSTYPE" == *darwin* ]]; then
bash macpack.sh
fi
replace ".vim"
replace ".tmux.conf"
replace ".gitconfig"
replace ".gitignore"
replace "powerlevel10k"
replace "zsh-autosuggestions"
replace ".p10k.zsh"
replace ".zshrc"
replace "golang_vars.sh"
replace ".zshenv"
mkdir -p ~/Library/LaunchAgents # this doesn't exist on linux but it doesn't do anything in that case so we may as well have it
replace "Library/LaunchAgents/com.1password.SSH_AUTH_SOCK.plist"
replace ".ssh/config"
# symlink to .1password for more standardised access
if test -f ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock; then
mkdir -p ~/.1password && ln -sf ~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock ~/.1password/agent.sock
fi