Subject: Re: [PATCH] (Really) Fix install-doc-quick target

From: Mark Levedahl <[email-masked]>
Date: Mon, 06 Aug 2007 21:55:20 -0400

Subject:   Re: [PATCH] (Really) Fix install-doc-quick target
To:        Junio C Hamano <[email-masked]>
Cc:        Johannes Schindelin <[email-masked]>,Mark 
Levedahl <[email-masked]>,Git Mailing List <[email-masked]>,Ren 
Scharfe <[email-masked]>
Bcc:
Reply-To:
Newsgroup:
-=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-
Junio C Hamano wrote:
 > Mark Levedahl <[email-masked]> writes:
 >
 >
 > How does this sound?
 >
 > ---
 > diff --git a/Documentation/install-doc-quick.sh 
b/Documentation/install-doc-quick.sh
 > index 07d227f..bc170f0 100755
 > --- a/Documentation/install-doc-quick.sh
 > +++ b/Documentation/install-doc-quick.sh
 > @@ -24,10 +24,10 @@ git read-tree $head
 >  git checkout-index -a -f --prefix="$mandir"/
 >
 >  if test -n "$GZ"; then
 > -    cd "$mandir"
 > -    for i in `git ls-tree -r --name-only $head`
 > +    git ls-tree -r --name-only $head |
 > +    while read path
 >      do
 > -        gzip < $i > $i.gz && rm $i
 > +        gzip "$mandir/$path"
 >      done
 >  fi
 >  rm -f "$GIT_INDEX_FILE"
 >
 >

Maybe this instead, many fewer gzip invocations, happily overwrites the 
old man pages already installed...

---
diff --git a/Documentation/install-doc-quick.sh 
b/Documentation/install-doc-quick.sh
index 07d227f..45f78fa 100755
--- a/Documentation/install-doc-quick.sh
+++ b/Documentation/install-doc-quick.sh
@@ -24,10 +24,6 @@ git read-tree $head
 git checkout-index -a -f --prefix="$mandir"/

 if test -n "$GZ"; then
-    cd "$mandir"
-    for i in `git ls-tree -r --name-only $head`
-    do
-        gzip < $i > $i.gz && rm $i
-    done
+    printf "$mandir/%s\n" $(git ls-tree -r --name-only $head) | xargs 
gzip -f
 fi
 rm -f "$GIT_INDEX_FILE"