# 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.
# 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
    mv usr/info/dir.new usr/info/dir
  fi
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
( cd usr/bin ; rm -rf makeinfo )
( cd usr/bin ; ln -sf texi2any makeinfo )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfo-convert.so )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfo-convert.so.1.0.0 libtexinfo-convert.so )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfo-convert.so.1 )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfo-convert.so.1.0.0 libtexinfo-convert.so.1 )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfo-convertxs.so )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfo-convertxs.so.1.0.0 libtexinfo-convertxs.so )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfo-convertxs.so.1 )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfo-convertxs.so.1.0.0 libtexinfo-convertxs.so.1 )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfo-main.so )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfo-main.so.0.0.0 libtexinfo-main.so )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfo-main.so.0 )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfo-main.so.0.0.0 libtexinfo-main.so.0 )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfo.so )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfo.so.1.0.0 libtexinfo.so )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfo.so.1 )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfo.so.1.0.0 libtexinfo.so.1 )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfoxs.so )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfoxs.so.1.0.0 libtexinfoxs.so )
( cd usr/lib64/texi2any/lib ; rm -rf libtexinfoxs.so.1 )
( cd usr/lib64/texi2any/lib ; ln -sf libtexinfoxs.so.1.0.0 libtexinfoxs.so.1 )
