summaryrefslogtreecommitdiff
path: root/lang/gcc/INSTALL
blob: 5ca5923bb7c2344fb3bea8c019dc5f0a8f4b76c7 (plain)
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
#
# Prior versions of the "gcc" package would install a corrupted
# info entry for "chill", which would foil subsequent installations.
# This script attempts to clean up that entry.

if [ $# -ne 2 -o ! -d "${PKG_PREFIX}" -o ! -w "${PKG_PREFIX}/info/dir" ]
# Script was called improperly.
then
    exit 1
fi

if [ "$2" != "PRE-INSTALL" ]
# No problem
then
    exit 0
fi

if [ ! -x /bin/ed ]
# Who knows? Give up.
then
    exit 0
fi

echo Fixing up infodir from previous installation\.\.\.
/bin/ed "${PKG_PREFIX}/info/dir" 2> /dev/null << END
/^* Chill/d
w
q
END
if [ $? -eq 0 ]
then
    echo \.\.\.fixed\.
    exit 0
fi
echo \.\.\.nothing to fix\.
exit 0