Subject: Re: [PATCH] Fix quick-install-doc

From: René Scharfe <[email-masked]>
Date: Sun, 05 Aug 2007 00:09:33 +0200

Johannes Schindelin schrieb:
> The recent work-tree cleanups exposed that the install-doc-quick
> script was relying on a strange behaviour predating the work-tree
> series: when setting a GIT_DIR, it was assumed that the current
> working directory is the root of the working tree.
> 
> The recent work-tree series changed that behaviour: now that you can
> set the work tree explicitely, the work tree root defaults to
> $GIT_DIR/.. if $GIT_DIR has a /.git suffix when that is a parent
> directory of the current working directory.

> -git checkout-index -a -f --prefix="$mandir"/
> +(cd "$mandir"; git checkout-index -a -f)

That won't work if $mandir doesn't exist, which can happen if you
install the manpages for the first time.  Simply add a mkdir:

   (mkdir -p "$mandir" && cd "$mandir" && git checkout-index -a -f)

René