diff options
-rw-r--r-- | scripts/makepkg.sh.in | 23 |
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 |