summaryrefslogtreecommitdiffstats
path: root/doc/rename.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 19:28:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 19:28:49 +0000
commit9f9b6e7b09a54b2c8089de33c975086104956249 (patch)
tree29445e7621f24b9ff64b2ea59a434ef0985a143e /doc/rename.sh
parentInitial commit. (diff)
downloadautoconf-dickey-9f9b6e7b09a54b2c8089de33c975086104956249.tar.xz
autoconf-dickey-9f9b6e7b09a54b2c8089de33c975086104956249.zip
Adding upstream version 2.52+20231210.upstream/2.52+20231210
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/rename.sh')
-rwxr-xr-xdoc/rename.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/rename.sh b/doc/rename.sh
new file mode 100755
index 0000000..99b248c
--- /dev/null
+++ b/doc/rename.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+# The ac252 package renames the entries in an info directory section to avoid
+# install-time conflict with the regular autoconf package. Newer versions of
+# install-info have a "--name" option which appears simpler, but does not solve
+# this particular problem -T.E.Dickey
+SRC=`echo "$1" | sed -e 's,^./,,'`
+DST=`echo "$2" | sed -e 's,^./,,'`
+SRC_NAME=`basename $SRC .info`
+DST_NAME=`basename $DST .info`
+if test "$SRC_NAME" != "$DST_NAME"
+then
+ PREFIX=`echo "$DST_NAME" | sed -e "s/$SRC_NAME.*$//"`
+ SUFFIX=`echo "$DST_NAME" | sed -e "s/^.*$SRC_NAME//"`
+
+ sed -e "s/^\*[ ]*\([^ ][^ ]*\):[ ]*($SRC_NAME)\(.\)/* $PREFIX\1$SUFFIX: ($DST_NAME)\2/" <$SRC | \
+ sed -e "s/^This is $SRC_NAME\.info,/This is $DST_NAME.info,/" |
+ sed -e "s/^File:[ ]*$SRC_NAME\.info/File: $DST_NAME.info/" >$DST
+elif test "$SRC" != "$DST"
+then
+ cat $SRC >$DST
+fi