[go: up one dir, main page]

File: postrm

package info (click to toggle)
localepurge 0.7.3.4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 384 kB
  • ctags: 11
  • sloc: sh: 464; perl: 88; makefile: 5
file content (38 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh

set -e

DPKG_CONFIG_FILE=/etc/dpkg/dpkg.cfg.d/50localepurge

#DEBHELPER#

if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
    db_purge
    rm -rf /var/cache/localepurge
    rm -f /etc/locale.nopurge
    if which ucf >/dev/null 2>&1 ; then
        ucf --debconf-ok --purge /etc/locale.nopurge
    else
        echo >&2 "/etc/locale.nopurge could not be purged because ucf was not found."
    fi
    if which ucfr >/dev/null 2>&1 ; then
        ucfr --purge localepurge /etc/locale.nopurge
    fi
    rm -f /etc/locale.nopurge.md5sum
    if [ -f "$DPKG_CONFIG_FILE.disabled" ] ; then
        echo "localepurge: Removing disabled auto-generated config file."
        rm -f "$DPKG_CONFIG_FILE.disabled"
    fi
    if [ -f "$DPKG_CONFIG_FILE" ] ; then
        echo "localepurge: Removing auto-generated config file."
        rm -f "$DPKG_CONFIG_FILE"
    fi
echo
echo "  To reinstall all the packages which localepurge has been taking care"
echo "  of before, you can use the following command:"
echo
echo "    apt-get -u --reinstall --fix-missing install \$(dpkg -S LC_MESSAGES | cut -d: -f1 | tr ', ' '${NEWLINE}' | sort -u)"
echo
fi