File: postrm

package info (click to toggle)
localepurge 0.0.74
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 188 kB
  • ctags: 6
  • sloc: sh: 642; makefile: 33
file content (24 lines) | stat: -rw-r--r-- 856 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh -e

DEBREINSTALL="$(tempfile).$$"

if [ "$1" = purge -a -e /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
    db_purge
    rm -rf /var/cache/localepurge
    rm -f /etc/locale.nopurge

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 --reinstall install \$(dpkg -S LC_MESSAGES | cut -d: -f1 | tr ', ' '\n' | sort -u)"
echo
# create a ready made shell script for further usage:
echo "apt-get -u --reinstall --fix-missing install \$(dpkg -S LC_MESSAGES | cut -d: -f1 | tr ', ' '\n' | sort -u)" > $DEBREINSTALL
mv $DEBREINSTALL /var/tmp/reinstall_debs.sh

echo "  For your further usage, the file \"/var/tmp/reinstall_debs.sh\""
echo "  contains an enhanced version the command line printed out above."
echo
fi