Hi Bruno,

On Sat, Sep 18, 2010 at 5:21 PM, Bruno Haible <[email protected]> wrote:
>> >   ./build-aux/git-version-gen /dev/null | sed -e 's/-dirty/-modified/'
>>
>> "UNKNOWN-modified"?  I don't know how you'd want to see that worked
>> into a version number.
>
> Hmm, for me that command prints
>  0.0.4280-882da
> Is your git version older than 1.6 ?

I took a quick look.  The problem is that "git-version-gen" knows
that it must be running in the gnulib root directory.  If it is not,
it just quietly inserts "UNKNOWN" into the output.  This script should
add this code early on:

cd_to_git_root() {
   test -d .git && return 0
   d=`dirname $0`/..
   test -d $d/.git && cd $d && return 0
   d=`git root`
   test -d $d/.git && cd $d && return 0
  die "cannot determine git version outside of repo"
}

cd_to_git_root

Reply via email to