File: xml-core.postrm

package info (click to toggle)
xml-core 0.09
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 212 kB
  • ctags: 30
  • sloc: perl: 558; makefile: 159; sh: 59; xml: 8
file content (48 lines) | stat: -rw-r--r-- 1,452 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
## ----------------------------------------------------------------------
## debian/postrm : postremoval script for xml-core
## ----------------------------------------------------------------------

## ----------------------------------------------------------------------
set -e

## ---------------------------------------------------------------------- 
## automatically generated debhelper commands
#DEBHELPER#

## ----------------------------------------------------------------------
if [ "$1" = "purge" ]
then

    ## ------------------------------------------------------------------
    ## remove /var/lib/xml-core
    cd /var/lib
    rmdir --ignore-fail-on-non-empty xml-core
    cd - >/dev/null

    ## ------------------------------------------------------------------
    ## remove root XML catalog
    rm -f /etc/xml/catalog
    rm -f /etc/xml/catalog.old

    ## ------------------------------------------------------------------
    ## remove /etc/xml
    cd /etc
    rmdir --ignore-fail-on-non-empty xml
    cd - >/dev/null

    ## ------------------------------------------------------------------
    ## restore legacy /etc/xml/catalog
    if [ -f /etc/xml/catalog.legacy ]
    then
        cd /etc/xml
	mv catalog.legacy catalog
        cd - >/dev/null
    fi

fi

## ---------------------------------------------------------------------- 
exit 0

## ----------------------------------------------------------------------