-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·30 lines (24 loc) · 956 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·30 lines (24 loc) · 956 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
#!/bin/bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
echo $DIR
cd ~
[[ ! -s ~/.vim ]] && ln -s $DIR/vim ~/.vim
[[ ! -s ~/.vimrc ]] && ln -s $DIR/vimrc ~/.vimrc
[[ ! -s ~/.tmux.conf ]] && ln -s $DIR/tmux.conf ~/.tmux.conf
[[ ! -s ~/.zshrc ]] && ln -s $DIR/zshrc ~/.zshrc
[[ ! -s ~/.config ]] && mkdir ~/.config
[[ ! -s ~/.config/nvim ]] && ln -s $DIR/nvim ~/.config/nvim
[[ ! -s ~/.config/starship.toml ]] && ln -s $DIR/starship.toml ~/.config/starship.toml
if [[ "$(uname)" == "Darwin" ]]; then
LAZYGIT_CONFIG_DIR="$HOME/Library/Application Support/lazygit"
else
LAZYGIT_CONFIG_DIR="$HOME/.config/lazygit"
fi
mkdir -p "$LAZYGIT_CONFIG_DIR"
LAZYGIT_CONFIG="$LAZYGIT_CONFIG_DIR/config.yml"
if [[ ! -e "$LAZYGIT_CONFIG" ]]; then
ln -s "$DIR/lazygit/config.yml" "$LAZYGIT_CONFIG"
elif [[ -f "$LAZYGIT_CONFIG" && ! -s "$LAZYGIT_CONFIG" && ! -L "$LAZYGIT_CONFIG" ]]; then
rm "$LAZYGIT_CONFIG"
ln -s "$DIR/lazygit/config.yml" "$LAZYGIT_CONFIG"
fi