File: postinst

package info (click to toggle)
gnugo 2.4-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,816 kB
  • ctags: 1,828
  • sloc: ansic: 22,091; tcl: 401; sh: 376; makefile: 202
file content (25 lines) | stat: -rw-r--r-- 553 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
#!/bin/sh -e

# movedoc - function to make the transition /usr/doc -> /usr/share/doc
movedoc()
{
    PKG=gnugo
    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
    if test -x /usr/bin/update-menus; then update-menus; fi
    movedoc
fi