-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_dev_tools.sh
More file actions
executable file
·80 lines (71 loc) · 1.6 KB
/
install_dev_tools.sh
File metadata and controls
executable file
·80 lines (71 loc) · 1.6 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
#!/bin/bash
# Bash script to install essential development tools on Arch Linux
# Check if running as root
if [[ $EUID -eq 0 ]]; then
echo "This script should not be run as root. Please run as a regular user with sudo privileges."
exit 1
fi
# List of official Arch Linux repository packages
PACMAN_PKGS=(
base-devel
git
python
nodejs
go
jdk-openjdk
lua
typescript
pyenv
python-pip
python-build
node-gyp
npm
vim
neovim
tree-sitter
tree-sitter-c
tree-sitter-lua
tree-sitter-markdown
tree-sitter-query
tree-sitter-vim
tree-sitter-vimdoc
texinfo
reflector
)
# List of AUR packages
AUR_PKGS=(
yay-bin
visual-studio-code-bin
zen-browser-bin
)
echo "Updating system package database..."
sudo pacman -Syu --noconfirm || {
echo "Failed to update package database"
exit 1
}
echo "Installing official repository packages..."
sudo pacman -S --needed --noconfirm "${PACMAN_PKGS[@]}" || {
echo "Failed to install some packages"
exit 1
}
# Check if yay is installed for AUR packages
if ! command -v yay &>/dev/null; then
echo "yay AUR helper is not installed. Installing yay..."
sudo pacman -S --needed --noconfirm git base-devel || {
echo "Failed to install dependencies for yay"
exit 1
}
git clone https://aur.archlinux.org/yay-bin.git /tmp/yay-bin
cd /tmp/yay-bin
makepkg -si --noconfirm || {
echo "Failed to install yay"
exit 1
}
cd -
fi
echo "Installing AUR packages..."
yay -S --needed --noconfirm "${AUR_PKGS[@]}" || {
echo "Failed to install some AUR packages"
exit 1
}
echo "All essential development tools installed successfully!"