| 1 | #!/bin/sh |
| 2 | # The ac252 package renames the entries in an info directory section to avoid |
| 3 | # install-time conflict with the regular autoconf package. Newer versions of |
| 4 | # install-info have a "--name" option which appears simpler, but does not solve |
| 5 | # this particular problem -T.E.Dickey |
| 6 | SRC=`echo "$1" | sed -e 's,^./,,'` |
| 7 | DST=`echo "$2" | sed -e 's,^./,,'` |
| 8 | SRC_NAME=`basename $SRC .info` |
| 9 | DST_NAME=`basename $DST .info` |
| 10 | if test "$SRC_NAME" != "$DST_NAME" |
| 11 | then |
| 12 | PREFIX=`echo "$DST_NAME" | sed -e "s/$SRC_NAME.*$//"` |
| 13 | SUFFIX=`echo "$DST_NAME" | sed -e "s/^.*$SRC_NAME//"` |
| 14 | |
| 15 | sed -e "s/^\*[ ]*\([^ ][^ ]*\):[ ]*($SRC_NAME)\(.\)/* $PREFIX\1$SUFFIX: ($DST_NAME)\2/" <$SRC | \ |
| 16 | sed -e "s/^This is $SRC_NAME\.info,/This is $DST_NAME.info,/" | |
| 17 | sed -e "s/^File:[ ]*$SRC_NAME\.info/File: $DST_NAME.info/" >$DST |
| 18 | elif test "$SRC" != "$DST" |
| 19 | then |
| 20 | cat $SRC >$DST |
| 21 | fi |