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

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

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

post_install() {
    mkdir -p /etc/sddm.conf.d
    install -Dm644 "$_sddm_src" "$_sddm_dst"
    if command -v systemctl >/dev/null 2>&1; then
        systemctl enable raveos-gnome-theme-apply.service >/dev/null 2>&1 || true
    fi
    if [[ -x /usr/lib/raveos-gnome-theme/auto-apply.sh ]]; then
        /usr/lib/raveos-gnome-theme/auto-apply.sh || true
    fi
}

post_upgrade() {
    mkdir -p /etc/sddm.conf.d
    install -Dm644 "$_sddm_src" "$_sddm_dst"
    if [[ -x /usr/lib/raveos-gnome-theme/auto-apply.sh ]]; then
        /usr/lib/raveos-gnome-theme/auto-apply.sh || true
    fi
}

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