source: lliurex-artwork-defaults/trunk/fuentes/debian/lliurex-artwork-defaults-desktop.postinst @ 2341

Last change on this file since 2341 was 2341, checked in by hectorgh, 3 years ago

wip on new diversions

  • Property svn:executable set to *
File size: 2.1 KB
Line 
1#!/bin/bash
2
3set -e
4
5
6APPORT_FILE="/etc/default/apport"
7
8
9if  [ "$1" = "configure" ] ; then
10
11        #update dconf database, as we droped new settings
12        dconf update
13       
14        #gconf trigger, for those settings still using gconf
15        [ -x /usr/bin/update-gconf-defaults ]  &&  /usr/bin/update-gconf-defaults
16
17        # Xsession diversion to solve the Unity problem
18        # Unity must be diverted
19
20        # First create the directory for destination desktops
21        [ -d "/usr/share/diverted-sessions/" ] || mkdir -p "/usr/share/diverted-sessions/"
22
23        ORIGINAL_UNITY_FILE="/usr/share/xsessions/mate.desktop"
24        NEW_DIVERTED_FILE="/usr/share/diverted-sessions/mate.desktop"
25        PKG="lliurex-artwork-defaults-desktop"
26        dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_FILE" "$ORIGINAL_UNITY_FILE"
27
28        ORIGINAL_WHISKER_ES_FILE="/usr/share/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.mo"
29        NEW_DIVERTED_ES_FILE="/usr/share/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.diverted"
30        LLIUREX_ES_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/es/xfce4-whiskermenu-plugin.mo"
31
32        ORIGINAL_WHISKER_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.mo"
33        NEW_DIVERTED_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.diverted"
34        LLIUREX_CA_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/ca/xfce4-whiskermenu-plugin.mo"
35
36        if [ -f "$ORIGINAL_WHISKER_ES_FILE" ]; then
37
38                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
39                ln -s "$LLIUREX_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
40
41        fi
42
43          if [ -f "$ORIGINAL_WHISKER_CA_FILE" ]; then
44
45                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
46                ln -s "$LLIUREX_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
47
48        fi
49
50
51       
52       
53
54        update-alternatives \
55                --install /usr/share/backgrounds/lliurex-default-background.png lliurex-default-background.png \
56                /usr/share/backgrounds/lliurex/lliurex16-desktop-HD.png 500
57
58
59        update-icon-caches /usr/share/icons/hicolor/scalable/ || true 
60
61
62        # DISABLE APPORT
63        echo "enabled=0" > "$APPORT_FILE"
64
65fi
66
67#DEBHELPER#
68
69exit 0
70
Note: See TracBrowser for help on using the repository browser.