This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] for generic-build-script


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gerrit P. Haase wrote:
| Hallo cygwin-apps,
|
| --- generic-build-script~       2004-05-19 15:49:55.827961600 +0200
| +++ generic-build-script        2004-05-19 15:49:41.196923200 +0200
| @@ -180,7 +180,7 @@
|      fi ;\
|    done &&\
|    if [ -d ${instdir}${prefix}/share/info ] ; then \
| -    find ${instdir}${prefix}/share/info -name "*.info" | xargs gzip
- -q ; \
| +    find ${instdir}${prefix}/share/info -name "*" | xargs gzip -q ; \
|    fi && \
|    if [ -d ${instdir}${prefix}/share/man ] ; then \
|      find ${instdir}${prefix}/share/man -name "*.1" -o -name "*.3" -o \
|
| # END OF ANNOUNCEMENT

Gerrit,

Could you explain your reasoning behind this patch?  Since I contributed
this part of the g-b-s, let me explain this.  Basically, I wanted to
make sure that we were gzipping just the man and info pages, not
subdirs, and not pages that were already compressed (I've built a couple
of programs that would gzip the man pages themselves on install).

But I see now with the info pages that it's more complicated than *.info
in the cases when there are multiple info page files for one program,
such as gcc, gdb, make, emacs, etc.  Is that what your intention is?

If so, let me propose the attached patch instead.  These changes should
make sure that:
1) all pages are being compressed, no matter how they are named;
2) only files are being compressed;
3) pages already compressed won't be compressed again;
4) if no qualifying pages are found, gzip won't complain (xargs -r).


Yaakov


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAq5qJpiWmPGlmQSMRAlQVAJ4vTbWKY0glYWmolz9QQhyoFEGYRACgrsPv
mJ9kH/pEDur2oHxLup+vFzI=
=vmxV
-----END PGP SIGNATURE-----
--- generic-build-script-orig	2004-05-19 13:08:39.923334400 -0400
+++ generic-build-script	2004-05-19 13:18:17.343624000 -0400
@@ -180,12 +180,12 @@
     fi ;\
   done &&\
   if [ -d ${instdir}${prefix}/share/info ] ; then \
-    find ${instdir}${prefix}/share/info -name "*.info" | xargs gzip -q ; \
+    find ${instdir}${prefix}/share/info -type f ! -name "*.gz" \
+      | xargs -r gzip -q ; \
   fi && \
   if [ -d ${instdir}${prefix}/share/man ] ; then \
-    find ${instdir}${prefix}/share/man -name "*.1" -o -name "*.3" -o \
-      -name "*.3x" -o -name "*.3pm" -o -name "*.5" -o -name "*.6" -o \
-      -name "*.7" -o -name "*.8" | xargs gzip -q ; \
+    find ${instdir}${prefix}/share/man -type f ! -name "*.gz" \
+      | xargs -r gzip -q ; \
   fi && \
   templist="" && \
   for f in ${install_docs} ; do \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]