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

Last change on this file since 4002 was 4002, checked in by hectorgh, 2 years ago

fixing diversions

  • Property svn:executable set to *
File size: 2.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
37
38        if [ ! -L "$ORIGINAL_WHISKER_ES_FILE" ]; then
39
40                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
41                ln -s "$LLIUREX_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
42
43        fi
44
45        if [ ! -L "$ORIGINAL_WHISKER_CA_FILE" ]; then
46
47                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
48                ln -s "$LLIUREX_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
49
50        fi
51       
52        if [ ! -L "$ORIGINAL_WHISKER_ES_FILE1" ]; then
53
54                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE1" "$ORIGINAL_WHISKER_ES_FILE1"
55                ln -s "$LLIUREX_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE1"
56
57        fi
58
59        if [ ! -L "$ORIGINAL_WHISKER_CA_FILE1" ]; then
60
61                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE1" "$ORIGINAL_WHISKER_CA_FILE1"
62                ln -s "$LLIUREX_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE1"
63
64        fi
65
66        if [ ! -e "$DIVERTED_AUTOSTART_FILE" ]; then
67
68                dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE" "$ORIGINAL_AUTOSTART_FILE"
69        fi
70
71        if [ ! -e "$DIVERTED_AUTOSTART_FILE1" ]; then
72
73                dpkg-divert --add --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE1" "$ORIGINAL_AUTOSTART_FILE1"
74        fi
75
76
77fi
78
79#DEBHELPER#
80
81exit 0
82
Note: See TracBrowser for help on using the repository browser.