-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstall
executable file
·87 lines (74 loc) · 3.43 KB
/
install
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
# Configure shared config dir
XDG_CONFIG_HOME="$HOME/.config"
mkdir -p "$XDG_CONFIG_HOME"
# Set up symlinks
ln -nfs "$(pwd)/ruby/.gemrc" "$HOME/.gemrc"
ln -nfs "$(pwd)/ruby/.irbrc" "$HOME/.irbrc"
ln -nfs "$(pwd)/zsh/.zshrc" "$HOME/.zshrc"
ln -nfs "$(pwd)/zsh/.zsh" "$HOME/.zsh"
ln -nfs "$(pwd)/.ruby-version" "$HOME/.ruby-version"
mkdir -p "$HOME/.bundle"
ln -nfs "$(pwd)/ruby/bundle/config" "$HOME/.bundle/config"
mkdir -p "$HOME/.bin"
ln -nfs "$(pwd)/bin/git-fixup" "$HOME/.bin/git-fixup"
ln -nfs "$(pwd)/bin/retry" "$HOME/.bin/retry"
ln -nfs "$(pwd)/bin/solargraph_wrapper" "$HOME/.bin/solargraph_wrapper"
ln -nfs "$(pwd)/vim/.vimrc" "$HOME/.vimrc"
ln -nfs "$(pwd)/vim/.gvimrc" "$HOME/.gvimrc"
ln -nfs "$(pwd)/vim/.vim" "$HOME/.vim"
ln -nfs "$(pwd)/vim/.vim" "$XDG_CONFIG_HOME/nvim"
ln -nfs "$(pwd)/cloc/" "$XDG_CONFIG_HOME/cloc"
ln -nfs "$(pwd)/hammerspoon" "$HOME/.hammerspoon"
ln -nfs "$(pwd)/.ignore_global" "$HOME/.ignore"
mkdir -p "$XDG_CONFIG_HOME/git"
ln -nfs "$(pwd)/git/.gitignore_global" "$XDG_CONFIG_HOME/git/.gitignore_global"
ln -nfs "$(pwd)/git/.gitattributes_global" "$XDG_CONFIG_HOME/git/.gitattributes_global"
mkdir -p "$XDG_CONFIG_HOME/tig"
ln -nfs "$(pwd)/git/.tigrc" "$XDG_CONFIG_HOME/tig/config"
mkdir -p "$XDG_CONFIG_HOME/ripgrep"
ln -nfs "$(pwd)/.ripgreprc" "$XDG_CONFIG_HOME/ripgrep/.ripgreprc"
mkdir -p "$XDG_CONFIG_HOME/bat"
ln -nfs "$(pwd)/bat/config" "$XDG_CONFIG_HOME/bat/config"
ln -nfs "$HOME/Library/Mobile Documents/com~apple~CloudDocs/vim/spell" "$HOME/.vim/spell"
mkdir -p "$HOME/.VIM_UNDO_FILES"
mkdir -p "$HOME/.gnupg"
ln -nfs "$(pwd)/.gnupg/gpg.conf" "$HOME/.gnupg/gpg.conf"
ln -nfs "$(pwd)/.gnupg/gpg-agent.conf" "$HOME/.gnupg/gpg-agent.conf"
mkdir -p "$HOME/.ctags.d"
ln -nfs "$(pwd)/config.ctags" "$HOME/.ctags.d/config.ctags"
# Silence login message on Shell start
touch $HOME/.hushlogin
# Copy powerlines
for file in ./powerline-fonts/Meslo/*.otf; do
cp -f "$file" "$HOME/Library/Fonts/"
done
# https://github.com/postmodern/chruby/issues/196#issuecomment-23826171
[[ -e /etc/zshenv ]] && sudo mv /etc/zshenv /etc/zprofile
git config --global user.email "[email protected]"
git config --global user.name "Tom de Bruijn"
git config --global core.excludesfile "$XDG_CONFIG_HOME/git/.gitignore_global"
git config --global core.attributesfile "$XDG_CONFIG_HOME/git/.gitattributes_global"
git config --global color.diff always
git config --global merge.ff only
git config --global pull.ff only
git config --global push.default current
git config --global remote.origin.prune true
git config --global merge.conflictstyle diff3
git config --global diff.noprefix true
git config --global core.pager "delta"
git config --global interactive.diffFilter "delta --color-only --features=interactive"
git config --global delta.max-line-length 0 # Don't truncate lines
git config --global delta.wrap-max-lines 0
# Allow use of markdown headers before git commit message scissors, after which
# the code starts.
git config --global commit.cleanup scissors
git config --global init.defaultBranch main
git config --global checkout.defaultRemote origin
git config --global push.autoSetupRemote true
if [ -n "$GPG_SIGNING_KEY" ]; then
git config --global user.signingkey $GPG_SIGNING_KEY
git config --global commit.gpgsign true
else
echo "WARNING: Git GPG configuration skipped. No \$GPG_SIGNING_KEY found."
fi