[FFmpeg-devel] [PATCH] Check for snapshot_version in source dir too.

Måns Rullgård mans
Thu Jan 7 18:48:50 CET 2010


Ramiro Polla <ramiro.polla at gmail.com> writes:

> On Wed, Jan 6, 2010 at 11:17 PM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
>> On Wed, Jan 6, 2010 at 11:10 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>>> Ramiro Polla <ramiro.polla <at> gmail.com> writes:
>>>> Currently version.sh only checks for snapshot_version in the build
>>>> directory. If the user has a tarball with no svn/git metadata and
>>>> decides to build out-of-tree it will still print UNKNOWN as version
>>>> string. Attached patch also checks in src directory if
>>>> snapshot_version is not found in build directory.
>>>
>>> Shouldn't version.sh only check in src directory?
>>
>> Hmm, yes, that would make more sense.
>>
>> Diego, could you please comment/commit?
>
> Here's a patch.
>
> Index: version.sh
> ===================================================================
> --- version.sh	(revision 21063)
> +++ version.sh	(working copy)
> @@ -1,7 +1,7 @@
>  #!/bin/sh
>  
>  # check for SVN revision number
> -revision=$(cat snapshot_version 2> /dev/null)
> +revision=$(cd "$1" && cat snapshot_version 2> /dev/null)
>  test $revision || revision=$(cd "$1" && LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
>  test $revision || revision=$(cd "$1" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2)
>  test $revision || revision=$(cd "$1" && sed -n -e '/^dir$/{n

OK

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list