forked from scottmckendry/dots
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup-ubuntu.sh
50 lines (41 loc) · 1.06 KB
/
setup-ubuntu.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
#!/bin/bash
# Symlinks: Target -> Destination
declare -A mappings=(
["$(pwd)/lazygit/"]=$HOME/.config/lazygit
["$(pwd)/nvim"]=$HOME/.config/nvim
)
# Dependencies
deps=(
"fzf"
"ripgrep"
"screen"
"tmux"
)
# Change to the directory of this script
cd "$(dirname "$0")"
echo "Removing existing files/directories..."
for key in "${!mappings[@]}"; do
rm -rf ${mappings[$key]}
done
echo "Creating symbolic links..."
for key in "${!mappings[@]}"; do
ln -sf $key ${mappings[$key]}
done
echo "Installing Dependencies..."
sudo apt update
depString=""
for dep in "${deps[@]}"; do
depString="$depString $dep"
done
sudo apt install $depString
wget -P ~/.local/share/fonts https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/JetBrainsMono.zip \
&& cd ~/.local/share/fonts \
&& unzip JetBrainsMono.zip \
&& rm JetBrainsMono.zip \
&& fc-cache -fv
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux64.tar.gz
sudo rm /bin/nvim
sudo ln -s /opt/nvim-linux64/bin/nvim /bin/nvim
echo "Done!"