~ubuntu-branches/ubuntu/vivid/debtags/vivid-proposed

« back to all changes in this revision

Viewing changes to debian/debtags.postinst

  • Committer: Package Import Robot
  • Author(s): Enrico Zini
  • Date: 2014-10-26 14:14:06 UTC
  • mfrom: (15.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20141026141406-4iqav6lctycy01jf
Tags: 1.12.3
Remove leftover empty dirs in /etc. Closes: #764235

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
 
 
3
 
set -ue
4
 
 
5
 
# Get rid of old indexes
6
 
rm -f /var/lib/debtags/*.idx*
7
 
 
8
 
# Regenerate the indexes
9
 
debtags update --local
 
2
# postinst script for #PACKAGE#
 
3
#
 
4
# see: dh_installdeb(1)
 
5
 
 
6
set -e
 
7
 
 
8
# summary of how this script can be called:
 
9
#        * <postinst> `configure' <most-recently-configured-version>
 
10
#        * <old-postinst> `abort-upgrade' <new version>
 
11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
 
12
#          <new-version>
 
13
#        * <postinst> `abort-remove'
 
14
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
 
15
#          <failed-install-package> <version> `removing'
 
16
#          <conflicting-package> <version>
 
17
# for details, see http://www.debian.org/doc/debian-policy/ or
 
18
# the debian-policy package
 
19
 
 
20
 
 
21
case "$1" in
 
22
    configure)
 
23
            # Get rid of old indexes
 
24
            rm -f /var/lib/debtags/*.idx*
 
25
 
 
26
            # Regenerate the indexes
 
27
            debtags update --local
 
28
    ;;
 
29
 
 
30
    abort-upgrade|abort-remove|abort-deconfigure)
 
31
    ;;
 
32
 
 
33
    *)
 
34
        echo "postinst called with unknown argument \`$1'" >&2
 
35
        exit 1
 
36
    ;;
 
37
esac
 
38
 
 
39
# dh_installdeb will replace this with shell code automatically
 
40
# generated by other debhelper scripts.
10
41
 
11
42
#DEBHELPER#
 
43
 
 
44
# Cleanup leftover empty directories (see #670697 #730077 #764235)
 
45
for dir in /etc/apt.conf.d /etc/debtags/sources.list.d/ /etc/debtags/
 
46
do
 
47
        if [ -d $dir ]
 
48
        then
 
49
                rmdir --ignore-fail-on-non-empty $dir
 
50
        fi
 
51
done
 
52
 
 
53
exit 0