summaryrefslogtreecommitdiffstats
path: root/source/ap/texinfo/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/texinfo/doinst.sh')
-rw-r--r--source/ap/texinfo/doinst.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/ap/texinfo/doinst.sh b/source/ap/texinfo/doinst.sh
index ab42f74f4..729cdcc09 100644
--- a/source/ap/texinfo/doinst.sh
+++ b/source/ap/texinfo/doinst.sh
@@ -1,5 +1,6 @@
# If no dir file exists, we'll assume it's a fresh installation and create one
-# Otherwise, we'll throw out the new copy to preserve what's already installed
+# Otherwise, we'll throw out the new copy to preserve what's already installed.
+# To update your own /usr/info/dir, see: man update-info-dir
if [ -e usr/info/dir ]; then
# If there is no topmost node, this dir file is broken, so replace it:
if ! grep -q "Node: Top" usr/info/dir ; then
@@ -8,4 +9,9 @@ if [ -e usr/info/dir ]; then
else
mv usr/info/dir.new usr/info/dir
fi
-
+# If these are the same, then remove usr/info/dir.new:
+if [ -r usr/info/dir -a -r usr/info/dir.new ]; then
+ if diff usr/info/dir usr/info/dir.new 1> /dev/null 2> /dev/null ; then
+ rm usr/info/dir.new
+ fi
+fi