File: xml-core.preinst

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 (50 lines) | stat: -rw-r--r-- 1,343 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
49
50
#!/bin/sh
## ----------------------------------------------------------------------
## debian/preinst : preinstallation script for xml-core
## ----------------------------------------------------------------------

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

## ----------------------------------------------------------------------
if [ "$1" = "install" -o "$1" = "upgrade" ]
then

    ## ------------------------------------------------------------------
    ## create /var/lib/xml-core
    if [ ! -d /var/lib/xml-core ]
    then
	mkdir /var/lib/xml-core 2>/dev/null
    fi

    ## ------------------------------------------------------------------
    ## create /etc/xml
    if [ ! -d /etc/xml ]
    then
	mkdir /etc/xml 2>/dev/null
    fi

fi

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

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

fi

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

exit 0

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