blob: 5b55e3b84d8c703fa90bbdf561365aab6d85171b (
plain)
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
|
#!/bin/bash
# Nyomtató támogatás telepítő script
# Környezeti változók: INSTALL_USER, INSTALL_HOME
set -e
USER="$INSTALL_USER"
HOME="$INSTALL_HOME"
ACTION="${1:-install}"
remove_installed_packages() {
local installed=()
local pkg
for pkg in "$@"; do
if pacman -Qq "$pkg" >/dev/null 2>&1; then
installed+=("$pkg")
fi
done
if ((${#installed[@]})); then
pacman -Rcns --noconfirm "${installed[@]}"
fi
}
if [[ "$ACTION" == "remove" ]]; then
echo "Removing printer support..."
systemctl disable --now cups 2>/dev/null || true
remove_installed_packages \
cups \
hplip \
system-config-printer \
epson-inkjet-printer-escpr \
epson-inkjet-printer-escpr2
echo "Printer support removal complete!"
exit 0
fi
echo "Installing printer support..."
# Alap nyomtató csomagok
pacman -S --noconfirm --needed \
cups \
hplip \
system-config-printer
# Epson nyomtatók
# Ezek a RaveOS környezetben repo-ból is elérhetők, ezért ne használjunk
# interaktív `yay` futtatást egy rootból indított installer scriptben.
pacman -S --noconfirm --needed \
epson-inkjet-printer-escpr \
epson-inkjet-printer-escpr2 \
|| true
# CUPS szolgáltatás engedélyezése
systemctl enable cups
systemctl start cups
echo "Printer support installation complete!"
|