-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_onchange_001_pacman.sh
66 lines (60 loc) · 1.32 KB
/
run_onchange_001_pacman.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
set -eo pipefail
# shellcheck disable=1091
OS=$(
source /etc/os-release
echo "$ID"
)
if [[ "$OS" != "manjaro" ]]; then
echo "Not Manjaro, skipping."
exit 0
fi
# Installs pacman packages
packages=(
"base-devel" "bat" "btop"
"chezmoi" "cmake" "composer" "cryfs" "curl"
"docker" "docker-buildx" "docker-compose"
"fd" "ffmpeg" "fzf"
"gdu" "git" "github-cli" "go"
"jq"
"lua51" "luarocks"
"m4" "make" "mosh"
"neofetch" "ninja" "nushell"
"onefetch" "openssh" "openssl"
"php" "php-apache" "php-cgi" "php-embed" "php-fpm" "php-gd" "php-igbinary" "php-redis"
"php-snmp" "postgresql-libs" "protobuf"
"ripgrep"
"unzip"
"zip"
"wget"
)
if [[ -n "${XDG_CURRENT_DESKTOP}" ]]; then
packages+=(
"android-tools" "android-udev" "appmenu-gtk-module"
"chromium"
"firefox-developer-edition"
"gtk3"
"keepassxc" "kimageformats" "kitty"
"libappindicator-gtk3" "librsvg" "libvips"
"onlyoffice-desktopeditors"
"powerdevil" "powertop"
"remmina"
"tlp" "tlpui"
"scrcpy"
"webkit2gtk"
"xdg-desktop-portal-gtk"
)
fi
for package in "${packages[@]}"; do
check=$(
pacman -Qi "$package" >/dev/null 2>&1
echo "$?"
)
if [[ "$check" -ne "0" ]]; then
echo "$package [installing]"
sudo pacman -Syu --needed --noconfirm "$package"
echo "$package [installed]"
else
echo "$package [installed]"
fi
done