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

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

fixing diversions

File size: 2.5 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
28        if [ -L "$ORIGINAL_WHISKER_ES_FILE" ]; then
29                rm -rf "$ORIGINAL_WHISKER_ES_FILE" || true
30                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
31
32        fi
33
34        if [ -L "$ORIGINAL_WHISKER_CA_FILE" ]; then
35
36                rm -rf "$ORIGINAL_WHISKER_CA_FILE" || true
37                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
38
39        fi
40       
41        if [ -L "$ORIGINAL_WHISKER_ES_FILE1" ]; then
42                rm -rf "$ORIGINAL_WHISKER_ES_FILE1" || true
43                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE1" "$ORIGINAL_WHISKER_ES_FILE1"
44
45        fi
46
47        if [ -L "$ORIGINAL_WHISKER_CA_FILE1" ]; then
48
49                rm -rf "$ORIGINAL_WHISKER_CA_FILE1" || true
50                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE1" "$ORIGINAL_WHISKER_CA_FILE1"
51
52        fi
53
54        if [ -e "$DIVERTED_AUTOSTART_FILE" ]; then
55
56                dpkg-divert --remove --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE" "$ORIGINAL_AUTOSTART_FILE"
57
58        fi
59
60        if [ -e "$DIVERTED_AUTOSTART_FILE1" ]; then
61
62                dpkg-divert --remove --package ${PKG} --rename --divert "$DIVERTED_AUTOSTART_FILE1" "$ORIGINAL_AUTOSTART_FILE1"
63
64        fi
65
66
67fi
68#DEBHELPER#
69
70exit 0
Note: See TracBrowser for help on using the repository browser.