summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-03-05 05:17:57 +0100
committerDan McGee <dan@archlinux.org>2010-03-15 00:34:27 +0100
commit6f0ffb23860e8d1b4593d60e970919ae7b31340d (patch)
treeac2a068f7f1da2bbd0f219a01a55c6dc54741d98 /scripts
parent5fe41df8a9eaac288433a54e216f96b1fe729c01 (diff)
downloadpacman-6f0ffb23860e8d1b4593d60e970919ae7b31340d.tar.gz
pacman-6f0ffb23860e8d1b4593d60e970919ae7b31340d.tar.xz
makepkg: always update symlinks to compressed man pages
When a man page has both symbolic and hard links, any symlink pointing to other than the alphabetically first hardlink was not "compressed" and left dangling towards the uncompressed man page. Fixes FS#18569. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in23
1 files changed, 12 insertions, 11 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 0fe06513..71352381 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -810,17 +810,18 @@ tidy_install() {
local manpage ext file link hardlinks hl
find ${MAN_DIRS[@]} -type f 2>/dev/null |
while read manpage ; do
- # check file still exists (potentially compressed with hard link)
- if [[ -f ${manpage} ]]; then
- ext="${manpage##*.}"
- file="${manpage##*/}"
- if [[ $ext != gz && $ext != bz2 ]]; then
- # update symlinks to this manpage
- find ${MAN_DIRS[@]} -lname "$file" 2>/dev/null |
- while read link ; do
- rm -f "$link"
- ln -sf "${file}.gz" "${link}.gz"
- done
+ ext="${manpage##*.}"
+ file="${manpage##*/}"
+ if [[ $ext != gz && $ext != bz2 ]]; then
+ # update symlinks to this manpage
+ find ${MAN_DIRS[@]} -lname "$file" 2>/dev/null |
+ while read link ; do
+ rm -f "$link"
+ ln -sf "${file}.gz" "${link}.gz"
+ done
+
+ # check file still exists (potentially already compressed due to hardlink)
+ if [[ -f ${manpage} ]]; then
# find hard links and remove them
# the '|| true' part keeps the script from bailing if find returned an
# error, such as when one of the man directories doesn't exist