File: postinst

package info (click to toggle)
doc-base 0.7.8
  • links: PTS
  • area: main
  • in suites: potato
  • size: 72 kB
  • ctags: 32
  • sloc: perl: 428; sh: 113; makefile: 72
file content (37 lines) | stat: -rw-r--r-- 601 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
#!/bin/sh
# postinst for doc-base

# Abort if any command returns an error value
set -e

package=doc-base

if [ "$DEBUG" ]; then
    echo entering $package postinst
    set -x
fi

add_docs ( ) {
    install-docs -i /usr/share/$package/$package
    install-docs -i /usr/share/$package/install-docs-man
}

compat_symlink ( ) {
    if [ -d /usr/doc ]; then
	if [ ! -e /usr/doc/$package -a -d /usr/share/doc/$package ]; then
	    ln -s ../share/doc/$package /usr/doc/$package
	fi
    fi
}

case "$1" in
  configure)
    add_docs
    compat_symlink
    ;;
  install)
    compat_symlink
    ;;
esac

exit 0