summaryrefslogtreecommitdiff
path: root/debian/dpkg.postinst
diff options
context:
space:
mode:
authorWichert Akkerman <wakkerma@debian.org>2002-06-21 19:54:28 +0000
committerWichert Akkerman <wakkerma@debian.org>2002-06-21 19:54:28 +0000
commit024777f22caa73008c0b4f913b8d9c3a640f2657 (patch)
treea928e1228ab9bc837444fab8b7e4e353145d32ba /debian/dpkg.postinst
parent1a3a1ad249828e6e1dcad92a5af1a337deccc988 (diff)
downloaddpkg-024777f22caa73008c0b4f913b8d9c3a640f2657.tar.gz
patch from Josip Rodin to improve the move from /usr/info to /usr/share/info
Diffstat (limited to 'debian/dpkg.postinst')
-rwxr-xr-xdebian/dpkg.postinst16
1 files changed, 13 insertions, 3 deletions
diff --git a/debian/dpkg.postinst b/debian/dpkg.postinst
index c190c9fca..f592fcf71 100755
--- a/debian/dpkg.postinst
+++ b/debian/dpkg.postinst
@@ -123,10 +123,20 @@ if [ -d /usr/doc -a ! -e /usr/doc/dpkg -a -d /usr/share/doc/dpkg ] ; then
fi
-if [ ! -L /usr/info/dir ]; then
- echo "Moving /usr/info/dir to /usr/share/info/dir, and creating /usr/info/dir symlink."
+if [ -d /usr/info -a ! -L /usr/info -a ! -L /usr/info/dir ]; then
+ echo Moving /usr/info/dir to /usr/share/info/dir.
mv /usr/info/dir /usr/share/info/dir
- ln -sf ../share/info/dir /usr/info/dir
+ if [ -f /usr/info/dir.old ]; then
+ mv /usr/info/dir.old /usr/share/info/dir.old
+ fi
+ if [ "`find /usr/info -empty`" = "/usr/info" ]; then
+ echo Making /usr/info a symlink to /usr/share/info.
+ rmdir /usr/info
+ ln -s share/info /usr/info
+ else
+ echo Making /usr/info/dir a symlink to /usr/share/info/dir.
+ ln -sf ../share/info/dir /usr/info/dir
+ fi
fi