Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 84 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 84 Rev 87
Line 28... Line 28...
28
#     so that unnecessary prompting doesn't happen if a package's
28
#     so that unnecessary prompting doesn't happen if a package's
29
#     installation fails and the `postinst' is called with `abort-upgrade',
29
#     installation fails and the `postinst' is called with `abort-upgrade',
30
#     `abort-remove' or `abort-deconfigure'.
30
#     `abort-remove' or `abort-deconfigure'.
31
LOCAL_DIRS="lib/pike/modules lib/pike${PIKE}/modules lib/pike/include lib/pike${PIKE}/include"
31
LOCAL_DIRS="lib/pike/modules lib/pike${PIKE}/modules lib/pike/include lib/pike${PIKE}/include"
32
32
-
 
33
update_modules () {
-
 
34
    $PIKEBIN -x dump $@ -q -r /usr/lib/$PIKEBIN/modules
-
 
35
    find /usr/lib/$PIKEBIN/modules -name '*.o' | sed 's/.o$//' |
-
 
36
    while read f; do 
-
 
37
	if [ ! -f $f ]; then
-
 
38
	    rm -f $f.o
-
 
39
	fi
-
 
40
    done
-
 
41
}
-
 
42
33
case "$1" in
43
case "$1" in
34
    configure)
44
    configure)
35
    update-alternatives --install /usr/bin/pike pike /usr/bin/${PIKEBIN} 12 \
45
    update-alternatives --install /usr/bin/pike pike /usr/bin/${PIKEBIN} 12 \
36
    --slave /usr/share/man/man1/pike.1.gz pike.1.gz /usr/share/man/man1/${PIKEBIN}.1.gz
46
    --slave /usr/share/man/man1/pike.1.gz pike.1.gz /usr/share/man/man1/${PIKEBIN}.1.gz
37
    #
47
    #
Line 40... Line 50...
40
    for d in $LOCAL_DIRS; do
50
    for d in $LOCAL_DIRS; do
41
        if [ ! -d /usr/local/$d ]; then
51
        if [ ! -d /usr/local/$d ]; then
42
            install -d -m 755 -o root -g root /usr/local/$d || true
52
            install -d -m 755 -o root -g root /usr/local/$d || true
43
        fi
53
        fi
44
    done
54
    done
-
 
55
-
 
56
    update_modules
45
    ;;
57
    ;;
46
58
47
    abort-upgrade|abort-remove|abort-deconfigure)
59
    abort-upgrade|abort-remove|abort-deconfigure)
48
60
49
    ;;
61
    ;;
50
62
-
 
63
    triggered)
-
 
64
	update_modules -u
-
 
65
51
    *)
66
    *)
52
        echo "postinst called with unknown argument \`$1'" >&2
67
        echo "postinst called with unknown argument \`$1'" >&2
53
        exit 1
68
        exit 1
54
    ;;
69
    ;;
55
esac
70
esac