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

Måns Rullgård mans
Thu Jan 7 02:24:41 CET 2010


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

> Hi,
>
> 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.
>
> Ramiro Polla
>
> Index: version.sh
> ===================================================================
> --- version.sh	(revision 21039)
> +++ version.sh	(working copy)
> @@ -2,6 +2,7 @@
>  
>  # check for SVN revision number
>  revision=$(cat snapshot_version 2> /dev/null)
> +test $revision || 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

I'd suggest checking only in the source dir.  If using a separate
build dir, there's no reason to have a version file there.

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



More information about the ffmpeg-devel mailing list