-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·60 lines (43 loc) · 1.39 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# Initial settings
export GHQ_ROOT=$HOME/repos
export GITHUB_USER=paveg
export GITHUB_REPO=dotfiles
export DOTDIR=$GHQ_ROOT/github.com/$GITHUB_USER/$GITHUB_REPO
export ZDOTDIR=$DOTDIR/zsh.d
export ZMODDIR=$ZDOTDIR/modules
export GLOBAL_BREWFILE_PATH=$HOME/.Brewfile
source $ZMODDIR/utils.zsh
log_info "Start installation"
is_exist_command brew || {
log_fail "Homebrew is not installed"
exit 1
}
if [[ -z $BUSINESS_USE ]]; then
ln -sfnv $DOTDIR/homebrew/Brewfile $GLOBAL_BREWFILE_PATH
else
ln -sfnv $DOTDIR/homebrew/Brewfile.work $GLOBAL_BREWFILE_PATH
fi
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
# Installation fonts
is_osx && cp -r $DOTDIR/fonts/* $HOME/Library/Fonts
ln -sfnv $ZDOTDIR/.zshenv $HOME/.zshenv
ln -sfnv $ZDOTDIR/.zshrc $HOME/.zshrc
ln -sfnv $ZDOTDIR/.zprofile $HOME/.zprofile
ln -sfnv $DOTDIR/git $XDG_CONFIG_HOME/git
# Environment variables
ln -sfnv $DOTDIR/.env.1password $HOME/.env.1password
# Brilliant command prompt
ln -sfn $DOTDIR/starship.toml $XDG_CONFIG_HOME/starship.toml
# Alacritty
ln -sfn $DOTDIR/alacritty $XDG_CONFIG_HOME/alacritty
# zellij
ln -snf $DOTDIR/zellij $XDG_CONFIG_HOME/zellij
# neovim
ln -snfv $DOTDIR/nvim $XDG_CONFIG_HOME/nvim
# lazygit
ln -sfnv $DOTDIR/lazygit $XDG_CONFIG_HOME/lazygit
# Ruby configuration
ln -sfn $DOTDIR/ruby/.irbrc $HOME/.irbrc
ln -sfn $DOTDIR/ruby/.rdbgrc $HOME/.rdbgrc
log_pass "Installation completed"