-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·120 lines (101 loc) · 3.33 KB
/
install.sh
File metadata and controls
executable file
·120 lines (101 loc) · 3.33 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/bash
is_wsl() {
grep -qEi "(Microsoft|WSL)" /proc/sys/kernel/osrelease
}
add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt-get install -y tmux stow tig neovim xclip bat git fd-find ripgrep \
xclip screen curl ca-certificates build-essential unzip
# Check if running in WSL
if ! is_wsl; then
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
if ! command -v greenclip > /dev/null
then
wget https://github.com/erebe/greenclip/releases/download/v4.2/greenclip && mv greenclip ~/.local/bin
fi
sudo apt-get install -y x11-xkb-utils x11-xserver-utils
fi
if ! command -v docker > /dev/null
then
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -a -G docker $USER
fi
if ! command -v tldr > /dev/null
then
if ! command -v pipx > /dev/null; then
sudo apt-get install -y pipx
fi
pipx install tldr
fi
if ! command -v fd > /dev/null
then
sudo ln -s $(which fdfind) /usr/bin/fd
fi
if ! command -v bat > /dev/null
then
sudo ln -s $(which batcat) /usr/bin/bat
fi
dragon_path="/opt/dragon"
if [ ! -d "$dragon_path" ]
then
sudo mkdir -p "$dragon_path"
sudo chown $USER:$USER "$dragon_path"
sudo git clone https://github.com/mwh/dragon.git "$dragon_path"
pushd "$dragon_path"
sudo apt-get install -y libgtk-3-dev
make install
popd
fi
if [ ! -f "$HOME/.fzf.bash" ]
then
if [ ! -d "$HOME/.fzf" ]
then
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
fi
bash ~/.fzf/install --no-update-rc --no-zsh --no-fish --completion --key-bindings
fi
git config --global alias.st status --show-stash
git config --global alias.last 'log -1 HEAD'
git config --global alias.ll log --oneline
git config --global alias.d diff
git config --global core.editor nvim
git config --global user.email "sami@pell.fi"
git config --global user.name "Sami Pellinen"
git config --global init.defaultBranch master
# aliased to ll
if ! command -v lsd > /dev/null
then
lsd_deb_name="lsd_0.21.0_amd64.deb"
lsd_repo_url="https://github.com/Peltoche/lsd"
wget "$lsd_repo_url/releases/download/0.21.0/$lsd_deb_name" && dpkg -i $lsd_deb_name && rm $lsd_deb_name
fi
if [ ! -d "$HOME/.nvm" ]
then
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
rm install.sh
fi
if ! command -v starship > /dev/null
then
curl -sS https://starship.rs/install.sh | sudo sh
fi
if ! command -v zoxide > /dev/null
then
curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh
fi
tpm_path="$HOME/.tmux/plugins/tpm"
if [ ! -d "$tpm_path" ]
then
mkdir -p "$tpm_path"
git clone https://github.com/tmux-plugins/tpm "$tpm_path"
fi
bash "$tpm_path/bin/install_plugins"
tmux source-file ~/.tmux.conf