summaryrefslogtreecommitdiff
path: root/raveos-hyprland-theme/raveos-hyprland-theme.install
blob: fc3d37cb167f965c003be9215fa73eb71f022c66 (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
_sddm_src="/usr/share/raveos/hyprland-theme/theme-data/sddm/sddm.conf"
_sddm_dst="/etc/sddm.conf.d/raveos-theme.conf"

pre_install() {
    # Ha a fájl már létezik de pacman nem ownolta (apply.sh telepítette),
    # töröljük - de ez csak pre_install esetén segít, pre_upgrade már késő
    # (a pacman ütközés-ellenőrzése ELŐBB fut mint ez a hook).
    # Ezért a konfig fájlt a post_* hook-ok telepítik, nem a package().
    rm -f "$_sddm_dst"
}

pre_upgrade() {
    rm -f "$_sddm_dst"
}

post_install() {
    mkdir -p /etc/sddm.conf.d
    install -Dm644 "$_sddm_src" "$_sddm_dst"
}

post_upgrade() {
    mkdir -p /etc/sddm.conf.d
    install -Dm644 "$_sddm_src" "$_sddm_dst"
}

post_remove() {
    rm -f "$_sddm_dst"
}