-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharch-post.sh
More file actions
executable file
·73 lines (65 loc) · 1.42 KB
/
Copy patharch-post.sh
File metadata and controls
executable file
·73 lines (65 loc) · 1.42 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
#!/bin/bash
install_git() {
echo ""
if [[ -x "$(command -v git)" ]]; then
echo "'git' is already installed"
else
echo "Installing 'git'"
pacman -S --noconfirm git
fi
}
install_yay() {
echo ""
if [[ -x "$(command -v yay)" ]]; then
echo "'yay' is already installed"
else
echo "Installing 'yay'"
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin || exit
makepkg -si
cd .. || exit
rm -rf yay-bin
fi
declare -A packages=(
["stow"]=stow
["tmux"]=tmux
["git-delta"]=delta
["ripgrep"]=rg
)
for pkg in "${!packages[@]}"; do
bin="${packages[$pkg]}"
if [[ -x "$(command -v "$bin")" ]]; then
echo "$pkg (binary: $bin) is already installed"
else
echo "Installing $pkg"
yay -S --noconfirm "$pkg"
fi
done
}
install_cargo() {
echo ""
if [[ -x "$(command -v cargo)" ]]; then
echo "'cargo' is already installed"
else
echo "Installing cargo"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
fi
declare -A packages=(
["bob-nvim"]=bob
["tmux-sessionizer"]=tms
["fnm"]=fnm
["tree-sitter-cli"]=tree-sitter
)
for pkg in "${!packages[@]}"; do
bin="${packages[$pkg]}"
if [[ -x "$(command -v "$bin")" ]]; then
echo "$pkg (binary: $bin) is already installed"
else
echo "Installing $pkg"
cargo install "$pkg"
fi
done
}
install_git
install_yay
install_cargo