72 lines
1.7 KiB
Bash
Executable File
72 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
PKG_KDE_APPS="kcalc dolphin-plugins elisa vlc-qt"
|
|
PKG_OFFICE="libreoffice-calc libreoffice-writer libreoffice-draw libreoffice-kf6"
|
|
PKG_NET="thunderbird net-tools remmina"
|
|
PKG_FLATPAK="discover-backend-flatpak flatpak"
|
|
|
|
#### Functions
|
|
check_root() {
|
|
if [ "$EUID" -ne 0 ]; then
|
|
echo "Must be root to run $0"
|
|
exit
|
|
fi
|
|
}
|
|
|
|
choice() {
|
|
echo -ne "[y/n]"
|
|
while true
|
|
do
|
|
read -rN1 input
|
|
case $input in
|
|
[yY][eE][sS]|[yY])
|
|
return 0
|
|
|
|
break
|
|
;;
|
|
[nN][oO]|[nN])
|
|
return 1
|
|
;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
#### Main
|
|
check_root
|
|
|
|
echo -ne "\nInstall of KDE minimal (setup eudev, D-Bus, Elogind, Meta KDE Plasma)? "
|
|
if choice 2>/dev/null; then
|
|
setup-apkrepos -c -1
|
|
setup-devd udev
|
|
setup-xorg-base
|
|
apk update
|
|
apk add dbus polkit-elogind elogind
|
|
rc-update add dbus
|
|
rc-update add polkit
|
|
rc-update add elogind
|
|
setup-desktop plasma
|
|
sed -i "s#^DisplayServer=wayland\$#DisplayServer=x11#" /etc/sddm.conf.d/plasma-wayland.conf # Bug https://gitlab.alpinelinux.org/alpine/aports/-/issues/16802
|
|
fi
|
|
|
|
echo -ne "\nYou want to install KDE apps ($PKG_KDE_APPS)? "
|
|
if choice 2>/dev/null; then
|
|
apk add $PKG_KDE_APPS
|
|
fi
|
|
|
|
echo -ne "\nYou want to install office packages ($PKG_OFFICE)? "
|
|
if choice 2>/dev/null; then
|
|
apk add $PKG_OFFICE
|
|
fi
|
|
|
|
echo -ne "\nYou want to install internet programs ($PKG_NET)? "
|
|
if choice 2>/dev/null; then
|
|
apk add $PKG_NET
|
|
fi
|
|
|
|
echo -ne "\nYou want to install support for Flatpak ($PKG_FLATPAK)? "
|
|
if choice 2>/dev/null; then
|
|
apk add $PKG_FLATPAK
|
|
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
|
|
fi
|