Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in64
1 files changed, 34 insertions, 30 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index f2f7109b..1eb3d3a7 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -733,37 +733,41 @@ tidy_install() {
rm -rf ${DOC_DIRS[@]}
fi
- msg2 "$(gettext "Compressing man pages...")"
- local manpage mandirs ext file link hardlinks hl
- mandirs="usr/man usr/share/man usr/local/man usr/local/share/man opt/*/man"
- find ${mandirs} -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" -a "$ext" != "bz2" ]; then
- # update symlinks to this manpage
- find ${mandirs} -lname "$file" 2>/dev/null | while read link ; do
- rm -f "$link"
- ln -sf "${file}.gz" "${link}.gz"
- done
- # 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
- hardlinks="$(find ${mandirs} \! -name "$file" -samefile "$manpage" 2>/dev/null)" || true
- for hl in ${hardlinks}; do
- rm -f "${hl}";
- done
- # compress the original
- gzip -9 "$manpage"
- # recreate hard links removed earlier
- for hl in ${hardlinks}; do
- ln "${manpage}.gz" "${hl}.gz"
- chmod 644 ${hl}.gz
- done
+ if [ "$(check_option zipman)" = "y" ]; then
+ msg2 "$(gettext "Compressing man pages...")"
+ local manpage mandirs ext file link hardlinks hl
+ mandirs="usr/man usr/share/man usr/local/man usr/local/share/man opt/*/man"
+ find ${mandirs} -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" -a "$ext" != "bz2" ]; then
+ # update symlinks to this manpage
+ find ${mandirs} -lname "$file" 2>/dev/null |
+ while read link ; do
+ rm -f "$link"
+ ln -sf "${file}.gz" "${link}.gz"
+ done
+ # 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
+ hardlinks="$(find ${mandirs} \! -name "$file" -samefile "$manpage" 2>/dev/null)" || true
+ for hl in ${hardlinks}; do
+ rm -f "${hl}";
+ done
+ # compress the original
+ gzip -9 "$manpage"
+ # recreate hard links removed earlier
+ for hl in ${hardlinks}; do
+ ln "${manpage}.gz" "${hl}.gz"
+ chmod 644 ${hl}.gz
+ done
+ fi
fi
- fi
- done
+ done
+ fi
if [ "$(check_option strip)" = "y" ]; then