source: lliurex-artwork-defaults/trunk/fuentes/debian/lliurex-artwork-defaults-common.prerm @ 5942

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

fixing libreoffice old configuration

File size: 3.1 KB
Line 
1#!/bin/bash
2
3set -e
4
5
6if [ "$1" = "remove" ] ; then
7        PKG="lliurex-artwork-defaults-common"
8
9        ORIGINAL_WHISKER_ES_FILE="/usr/share/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.mo"
10        NEW_DIVERTED_ES_FILE="/usr/share/lliurex-artwork-defaults/diversions/xfce4-whiskermenu-plugin-es.diverted"
11        ORIGINAL_WHISKER_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.mo"
12        NEW_DIVERTED_CA_FILE="/usr/share/lliurex-artwork-defaults/diversions/xfce4-whiskermenu-plugin-ca.diverted"
13       
14
15
16        ORIGINAL_WHISKER_ES_FILE1="/usr/share/locale/es/LC_MESSAGES/mate-xfce4-panel-plugin-loader-applet.mo"
17        NEW_DIVERTED_ES_FILE1="/usr/share/lliurex-artwork-defaults/diversions/mate-xfce4-panel-plugin-loader-applet.mo-es.diverted"
18        ORIGINAL_WHISKER_CA_FILE1="/usr/share/locale/ca/LC_MESSAGES/mate-xfce4-panel-plugin-loader-applet.mo"
19        NEW_DIVERTED_CA_FILE1="/usr/share/lliurex-artwork-defaults/diversions/mate-xfce4-panel-plugin-loader-applet.mo-ca.diverted"
20       
21        ORIGINAL_AUTOSTART_FILE="/etc/xdg/autostart/deja-dup-monitor.desktop"
22        DIVERTED_AUTOSTART_FILE="/usr/share/lliurex-artwork-defaults/diversions/deja-dup-monitor.desktop"
23
24        ORIGINAL_AUTOSTART_FILE1="/usr/share/mate/autostart/tilda.desktop"
25        DIVERTED_AUTOSTART_FILE1="/usr/share/lliurex-artwork-defaults/diversions/tilda.desktop"
26
27        ORIGINAL_LO_MOD="/usr/share/ubuntu-mate/settings-overlay/config/libreoffice/4/user/registrymodifications.xcu"
28        DIVERTED_LO_MOD="/usr/share/lliurex-artwork-defaults/diversions/registrymodifications.xcu"
29        LLIUREX_LO_MOD="/usr/share/lliurex-artwork-defaults/libreoffice/registrymodifications.xcu"
30
31        if [ -L "$ORIGINAL_WHISKER_ES_FILE" ]; then
32                rm -rf "$ORIGINAL_WHISKER_ES_FILE" || true
33                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
34
35        fi
36
37        if [ -L "$ORIGINAL_WHISKER_CA_FILE" ]; then
38
39                rm -rf "$ORIGINAL_WHISKER_CA_FILE" || true 
40                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
41
42        fi
43       
44        if [ -L "$ORIGINAL_WHISKER_ES_FILE1" ]; then
45                rm -rf "$ORIGINAL_WHISKER_ES_FILE1" || true
46                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE1" "$ORIGINAL_WHISKER_ES_FILE1"
47
48        fi
49
50        if [ -L "$ORIGINAL_WHISKER_CA_FILE1" ]; then
51
52                rm -rf "$ORIGINAL_WHISKER_CA_FILE1" || true 
53                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE1" "$ORIGINAL_WHISKER_CA_FILE1"
54
55        fi
56
57        if [ -e "$DIVERTED_AUTOSTART_FILE" ]; then
58
59                dpkg-divert --remove --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE" "$ORIGINAL_AUTOSTART_FILE"
60
61        fi
62
63        if [ -e "$DIVERTED_AUTOSTART_FILE1" ]; then
64
65                dpkg-divert --remove --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE1" "$ORIGINAL_AUTOSTART_FILE1"
66
67        fi
68
69        if [ -L "$ORIGINAL_LO_MOD" ]; then
70
71                rm -rf "$ORIGINAL_LO_MOD" || true
72                dpkg-divert --remove --package ${PKG} --rename --divert "$DIVERTED_LO_MOD" "$ORIGINAL_LO_MOD"
73
74        fi
75
76
77        update-alternatives --auto x-session-manager || true
78
79
80fi
81#DEBHELPER#
82
83exit 0
Note: See TracBrowser for help on using the repository browser.