File: postinst

package info (click to toggle)
netcdf-doc 1%3A3-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 936 kB
  • ctags: 3
  • sloc: makefile: 54; sh: 35
file content (27 lines) | stat: -rw-r--r-- 644 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
#!/bin/sh -e

# movedoc - function to make the transition /usr/doc -> /usr/share/doc
movedoc()
{
    PKG=netcdf-doc
    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
    install-info --quiet --section "netCDF" "netCDF" \
      --description="Unidata C++ netCDF interface." \
      /usr/share/info/cxxdoc.info.gz
    movedoc
fi