File: postinst

package info (click to toggle)
netcdf-perl 1.2-9
  • links: PTS
  • area: main
  • in suites: potato
  • size: 276 kB
  • ctags: 7
  • sloc: perl: 366; makefile: 154; sh: 31
file content (24 lines) | stat: -rw-r--r-- 499 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

# movedoc - function to make the transition /usr/doc -> /usr/share/doc
movedoc()
{
    PKG=netcdf-perl
    OLD=/usr/doc/$PKG
    NEW=/usr/share/doc/$PKG
    if test -d $OLD -a ! -h $OLD -a ! $OLD -ef $NEW; then
	rm -f $OLD/.dhelp
	if test -e $OLD && ! rmdir $OLD 2>/dev/null; then
	    VERSION_CONTROL=t \
	    cp -ab $OLD $NEW/..
	    rm -rf $OLD
	fi
    fi
    if test -d /usr/doc -a ! -e $OLD -a -d $NEW; then
	ln -s $NEW $OLD
    fi
}

if [ "$1" = configure ]; then
    movedoc
fi