summaryrefslogtreecommitdiff
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.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/ap/texinfo/doinst.sh b/source/ap/texinfo/doinst.sh
new file mode 100644
index 00000000..ab42f74f
--- /dev/null
+++ b/source/ap/texinfo/doinst.sh
@@ -0,0 +1,11 @@
+# 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
+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
+ mv usr/info/dir.new usr/info/dir
+ fi
+else
+ mv usr/info/dir.new usr/info/dir
+fi
+