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

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

adding postinst

File size: 1.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/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.diverted"
11        LLIUREX_ES_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/es/xfce4-whiskermenu-plugin.mo"
12
13        ORIGINAL_WHISKER_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.mo"
14        NEW_DIVERTED_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.diverted"
15        LLIUREX_CA_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/ca/xfce4-whiskermenu-plugin.mo"
16
17        if [ -f "$NEW_DIVERTED_ES_FILE" ]; then
18                rm -rf $ORIGINAL_WHISKER_ES_FILE || true
19                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
20
21        fi
22
23        if [ -f "$NEW_DIVERTED_CA_FILE" ]; then
24
25                rm -rf $ORIGINAL_WHISKER_CA_FILE || true
26                dpkg-divert --remove --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
27
28        fi
29
30
31fi
32#DEBHELPER#
33
34exit 0
Note: See TracBrowser for help on using the repository browser.