File: breeze-cursor-theme.postinst

package info (click to toggle)
breeze 4%3A5.20.5-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 26,044 kB
  • sloc: cpp: 13,741; sh: 152; python: 40; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 939 bytes parent folder | download | duplicates (5)
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
#! /bin/sh
set -e

TARGET=/usr/share/icons/default/index.theme
ICONDIR=/etc/X11/cursors

# breeze_cursors with 102 (DMZ+2) priority
update-alternatives --install $TARGET x-cursor-theme \
    $ICONDIR/breeze_cursors.theme 102

# Breeze_Snow with 41 (Oxygen+1) priority
update-alternatives --install $TARGET x-cursor-theme \
    $ICONDIR/Breeze_Snow.theme 41

case "$1" in
    configure)
        # On upgrade from a version that was badly managing the
        # x-cursor-theme, remove the old ones from the alternatives.
        version="$2"
        if [ -n "$version" ] && \
                dpkg --compare-versions "$version" lt "4:5.4.1-2~"; then
            update-alternatives --remove x-cursor-theme \
                /usr/share/icons/Breeze_Snow/index.theme    || true
            update-alternatives --remove x-cursor-theme \
                /usr/share/icons/breeze_cursors/index.theme || true
        fi
        ;;
esac

#DEBHELPER#