makepkg: fix recreation of hardlinks to .gz manpages
commit4a02350ded318bdc1da5421551784ab2a10dd96b
authorDave Reisner <dreisner@archlinux.org>
Wed, 14 Sep 2011 03:02:36 +0000 (13 23:02 -0400)
committerDave Reisner <dreisner@archlinux.org>
Wed, 14 Sep 2011 21:25:29 +0000 (14 17:25 -0400)
tree1a3579a2802490add5a06ccb99b40bb7ba47bb60
parentd1e04c1b677d733262a0436ed9b25b2e7eada15e
makepkg: fix recreation of hardlinks to .gz manpages

4ed12ae tightened up the logic to use only find, but ignored the fact
that since the manpage hard link names were no longer captured. They
were created as separate compressed manpages, rather than as hardlinks.

This also introduces a minor efficiency of deleting all hardlinks at
once and using proper iteration over an array rather than a string.

Note to anyone else touching this code: e2fsprogs and libpcap are useful
for testing this. If that changes in the future, you can use the below
bash to locate others:

  IFS=$'\n' read -rd '' -a a < <(find /usr/share/man -type f \! -links 1)
  pacman -Qqo "${a[@]}" | sort -u

I broke it!

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
scripts/makepkg.sh.in