-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·77 lines (65 loc) · 2.33 KB
/
setup
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
#!/bin/bash
set -e
export BBENV="$(cd "$(dirname "$0")" && pwd)"
function header {
printf '\n\e[4;1m%s\e[0m\n' "$1"
}
# =============================================================================
# apt packages used by the rest of the script
# =============================================================================
header "SETUP APT"
sudo apt-get -y update
sudo apt-get -y install \
build-essential \
cmake \
coreutils \
curl \
git \
grep \
perl \
jq \
zip unzip \
zsh \
;
. ./setup-python.zsh
# =============================================================================
# setup XDG_CONFIG_HOME
# =============================================================================
header "SETUP CONFIG"
mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}
ln -sf $BBENV/xdg_config/* ${XDG_CONFIG_HOME:-$HOME/.config}/
# =============================================================================
# setup zsh
# =============================================================================
header "SETUP ZSH"
sudo chsh -s "$(which zsh)" "$USER"
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
touch "$CONF_DIR/.zshrc.local"
ln -sf "$BBENV/.zshenv" "$HOME/.zshenv"
PLUGIN_DIR="$CONF_DIR/plugins"
curl -sS --create-dirs -L -o "$PLUGIN_DIR/zsh-history-substring-search.zsh" \
https://raw.githubusercontent.com/zsh-users/zsh-history-substring-search/master/zsh-history-substring-search.zsh
# =============================================================================
# install other components using zsh so that they have paths from .zshenv
# =============================================================================
. "$HOME/.zshenv"
if dpkg -s gnome-shell >/dev/null 2>&1; then
. ./setup-gnome.zsh
. ./setup-fonts.zsh
fi
. ./setup-git.zsh
. ./setup-go.zsh
. ./setup-rust.zsh
. ./setup-nodejs.zsh
. ./setup-lua.zsh
. ./setup-language-servers.zsh
. ./setup-neovim.zsh
# =============================================================================
# Misc tools
# =============================================================================
header "INSTALL MORE MISC TOOLS"
go install github.com/jesseduffield/lazygit@latest
# =============================================================================
# run post-install configurations
# =============================================================================
. ./configure-git.zsh