-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·53 lines (44 loc) · 1.4 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
#!/bin/bash
exec > >(tee -i $HOME/dotfiles_install.log)
exec 2>&1
set -x
PACKAGES_NEEDED="\
bat \
fuse \
dialog \
apt-utils \
universtal-ctags \
tmux \
silversearch-ag \
fuse \
ripgrep \
libfuse2"
if ! dpkg -s ${PACKAGES_NEEDED} > /dev/null 2>&1; then
if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
sudo apt-get update
fi
sudo echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
sudo apt-get -y -q install ${PACKAGES_NEEDED}
fi
sudo apt-get --assume-yes install silversearcher-ag fuse
# install latest neovim
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
sudo chmod u+x nvim.appimage
sudo mv nvim.appimage /usr/local/bin/nvim
# Config git and gh
ln -sf $(pwd)/gitconfig $HOME/.gitconfig
mkdir -p $HOME/.config/gh
ln -s $(pwd)/gh_config.yml $HOME/.config/gh/.config.yml
scripts/install_gh_extensions.sh
# Move various dotfiles to various places
ln -s $(pwd)/tmux.conf $HOME/.tmux.conf
ln -s $(pwd)/vim $HOME/.vim
rm -f $HOME/.zshrc
ln -s $(pwd)/zshrc $HOME/.zshrc
cp garman.zsh-theme ~/.oh-my-zsh/themes/
# Config nvim
rm -rf $HOME/.config
mkdir $HOME/.config
ln -s "$(pwd)/config/nvim" "$HOME/.config/nvim"
HEADLESS_NEOVIM=1 /usr/local/bin/nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
sudo chsh -s "$(which zsh)" "$(whoami)"