-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
43 lines (37 loc) · 1.14 KB
/
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
39
40
41
42
43
#!/bin/bash
if [ "$(which fzf | wc -l)" -eq 0 ]; then
echo 'fzf is not installed, installing...'
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install
fi
SOURCE_DOTFILE="source ~/dotfiles/.bashrc"
PROFILE="$HOME/.bashrc"
if [ -f "$HOME/.zshrc" ]; then
PROFILE="$HOME/.zshrc"
fi
GREP_DOTFILE_BASHRC=$(grep -c "$SOURCE_DOTFILE" "$PROFILE")
if [ "$GREP_DOTFILE_BASHRC" -eq 0 ]; then
echo "$SOURCE_DOTFILE" >> "$PROFILE"
source "$PROFILE"
echo 'dotfiles/.bashrc is sourced now'
fi
if [ ! -f "$HOME/.tmux.conf" ]; then
echo 'Create symbolic link for tmux.conf'
ln -vs "$HOME/dotfiles/.tmux.conf" "$HOME/.tmux.conf"
echo ''
fi
if [ ! -d "$HOME/.oh-my-bash/themes/mytheme" ]; then
echo 'Create symbolic link for custom theme for oh-my-bash'
ln -vs "$HOME/dotfiles/mytheme/" "$HOME/.oh-my-bash/themes/"
echo ''
fi
if [ ! -d "$HOME/.config/lvim" ]; then
echo 'Create symbolic link for config for lunarvim'
ln -vs "$HOME/dotfiles/lvim/" "$HOME/.config/"
echo ''
fi
if [ ! -f "$HOME/.gitignore" ]; then
echo 'Create symbolic link for gitignore'
ln -vs "$HOME/dotfiles/.gitignore" "$HOME/.gitignore"
echo ''
fi