-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·47 lines (38 loc) · 1.15 KB
/
bootstrap.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
#!/usr/bin/env bash
set -eux
DOTFILE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &>/dev/null && pwd )"
sudo apt update
sudo apt install -y \
gnupg2 \
htop \
jo \
jq \
less \
locales \
man \
psmisc \
ripgrep \
vim \
zsh
sudo sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen
sudo locale-gen
cp "$DOTFILE_DIR"/gitignore "$HOME"/.gitignore
if [ ! -d "$HOME"/.oh-my-zsh ]; then
curl --proto '=https' --tlsv1.3 -vfsSL https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | zsh
fi
cp "$DOTFILE_DIR"/zshenv "$HOME"/.zshenv
cp "$DOTFILE_DIR"/prompt.zsh "$HOME"/.prompt.zsh
cp "$DOTFILE_DIR"/zshrc "$HOME"/.zshrc
cp -r "$DOTFILE_DIR"/omz/plugins/* "$HOME"/.oh-my-zsh/custom/plugins/
mkdir -p "$HOME"/bin
cp -rp "$DOTFILE_DIR"/bin/* "$HOME"/bin/
if (command -v cargo && ! command -v cargo-nextest) >/dev/null 2>&1 ; then
curl --proto '=https' --tlsv1.3 -fLsSv https://get.nexte.st/latest/linux \
| tar xzvf - -C "$HOME"/bin
fi
if command -v k3d >/dev/null 2>&1 ; then
k3d kubeconfig merge -da 2>/dev/null || true
if command -v just-k3d >/dev/null 2>&1 ; then
just-k3d use
fi
fi