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

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

adding postinst

  • Property svn:executable set to *
File size: 1.2 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        ORIGINAL_WHISKER_ES_FILE="/usr/share/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.mo"
13        NEW_DIVERTED_ES_FILE="/usr/share/locale/es/LC_MESSAGES/xfce4-whiskermenu-plugin.diverted"
14        LLIUREX_ES_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/es/xfce4-whiskermenu-plugin.mo"
15
16        ORIGINAL_WHISKER_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.mo"
17        NEW_DIVERTED_CA_FILE="/usr/share/locale/ca/LC_MESSAGES/xfce4-whiskermenu-plugin.diverted"
18        LLIUREX_CA_FILE="/usr/share/lliurex-artwork-defaults/whiskermenu/locale/ca/xfce4-whiskermenu-plugin.mo"
19
20        if [ ! -f "$NEW_DIVERTED_ES_FILE" ]; then
21
22                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
23                ln -s "$LLIUREX_ES_FILE" "$ORIGINAL_WHISKER_ES_FILE"
24
25        fi
26
27        if [ ! -f "$NEW_DIVERTED_CA_FILE" ]; then
28
29                dpkg-divert --add --package ${PKG} --rename --divert "$NEW_DIVERTED_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
30                ln -s "$LLIUREX_CA_FILE" "$ORIGINAL_WHISKER_CA_FILE"
31
32        fi
33
34
35fi
36
37#DEBHELPER#
38
39exit 0
40
Note: See TracBrowser for help on using the repository browser.