source: lliurex-artwork-defaults/trunk/fuentes/debian/lliurex-artwork-defaults-common.postinst @ 7001

Last change on this file since 7001 was 7001, checked in by hectorgh, 23 months ago

diverting geogebra cron file

  • Property svn:executable set to *
File size: 3.8 KB
Line 
1#!/bin/bash
2
3set -e
4
5
6APPORT_FILE="/etc/default/apport"
7
8
9if  [ "$1" = "configure" ] ; then
10
11        PKG="lliurex-artwork-defaults-common"
12
13        ORIGINAL_WHISKER_ES_FILE="/usr/share/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.mo"
14        NEW_DIVERTED_ES_FILE="/usr/share/lliurex-artwork-defaults/diversions/xfce4-whiskermenu-plugin-es.diverted"
15
16       
17        ORIGINAL_WHISKER_ES_FILE1="/usr/share/locale/es/LC_MESSAGES/mate-xfce4-panel-plugin-loader-applet.mo"
18        NEW_DIVERTED_ES_FILE1="/usr/share/lliurex-artwork-defaults/diversions/mate-xfce4-panel-plugin-loader-applet.mo-es.diverted"
19
20        LLIUREX_ES_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/es/xfce4-whiskermenu-plugin.mo"
21
22        ORIGINAL_WHISKER_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.mo"
23        NEW_DIVERTED_CA_FILE="/usr/share/lliurex-artwork-defaults/diversions/xfce4-whiskermenu-plugin-ca.diverted"
24
25        ORIGINAL_WHISKER_CA_FILE1="/usr/share/locale/ca/LC_MESSAGES/mate-xfce4-panel-plugin-loader-applet.mo"
26        NEW_DIVERTED_CA_FILE1="/usr/share/lliurex-artwork-defaults/diversions/mate-xfce4-panel-plugin-loader-applet.mo-ca.diverted"
27
28        LLIUREX_CA_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/ca/xfce4-whiskermenu-plugin.mo"
29
30        ORIGINAL_AUTOSTART_FILE="/etc/xdg/autostart/deja-dup-monitor.desktop"
31        DIVERTED_AUTOSTART_FILE="/usr/share/lliurex-artwork-defaults/diversions/deja-dup-monitor.desktop"
32
33        ORIGINAL_AUTOSTART_FILE1="/usr/share/mate/autostart/tilda.desktop"
34        DIVERTED_AUTOSTART_FILE1="/usr/share/lliurex-artwork-defaults/diversions/tilda.desktop"
35
36        ORIGINAL_LO_MOD="/usr/share/ubuntu-mate/settings-overlay/config/libreoffice/4/user/registrymodifications.xcu"
37        DIVERTED_LO_MOD="/usr/share/lliurex-artwork-defaults/diversions/registrymodifications.xcu"
38        LLIUREX_LO_MOD="/usr/share/lliurex-artwork-defaults/libreoffice/registrymodifications.xcu"
39
40        ORIGINAL_GEOGEBRA="/etc/cron.daily/geogebra"
41        DIVERTED_GEOGEBRA="/usr/share/lliurex-artwork-defaults/diversions/geogebra"
42
43        if [ ! -L "$ORIGINAL_WHISKER_ES_FILE" ]; then
44
45                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
46                ln -s "$LLIUREX_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
47
48        fi
49
50        if [ ! -L "$ORIGINAL_WHISKER_CA_FILE" ]; then
51
52                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
53                ln -s "$LLIUREX_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
54
55        fi
56       
57        if [ ! -L "$ORIGINAL_WHISKER_ES_FILE1" ]; then
58
59                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE1" "$ORIGINAL_WHISKER_ES_FILE1"
60                ln -s "$LLIUREX_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE1"
61
62        fi
63
64        if [ ! -L "$ORIGINAL_WHISKER_CA_FILE1" ]; then
65
66                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE1" "$ORIGINAL_WHISKER_CA_FILE1"
67                ln -s "$LLIUREX_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE1"
68
69        fi
70
71        if [ ! -e "$DIVERTED_AUTOSTART_FILE" ]; then
72
73                dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE" "$ORIGINAL_AUTOSTART_FILE"
74        fi
75
76        if [ ! -e "$DIVERTED_AUTOSTART_FILE1" ]; then
77
78                dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE1" "$ORIGINAL_AUTOSTART_FILE1"
79        fi
80
81
82        if [ ! -L "$ORIGINAL_LO_MOD" ]; then
83
84                dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_LO_MOD" "$ORIGINAL_LO_MOD"
85                ln -s "$LLIUREX_LO_MOD" "$ORIGINAL_LO_MOD"
86
87        fi
88
89        if [ ! -e "$DIVERTED_GEOGEBRA" ]; then
90                dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_GEOGEBRA" "$ORIGINAL_GEOGEBRA"
91        fi
92
93
94        update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/mate-session 60
95        update-alternatives --set x-session-manager /usr/bin/mate-session || true
96
97
98fi
99
100#DEBHELPER#
101
102exit 0
103
Note: See TracBrowser for help on using the repository browser.