changeset 36850:d0b9b50d1c07

configure: add support for specifying a branch to use. This is intended for use in releases.
author reimar
date Wed, 26 Feb 2014 19:19:09 +0000
parents 0177bb090db2
children 5a61b8dd0aad
files configure
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Wed Feb 26 00:32:28 2014 +0000
+++ b/configure	Wed Feb 26 19:19:09 2014 +0000
@@ -1507,9 +1507,12 @@
     exit 1
 fi
 
+FFBRANCH=master
+test -e FFBRANCH && FFBRANCH=$(cat FFMPEG_BRANCH)
+
 if test -e ffmpeg/mp_auto_pull ; then
     echo "Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable"
-    (cd ffmpeg && git checkout master)
+    (cd ffmpeg && git checkout $FFBRANCH)
     if ! (cd ffmpeg && git pull --rebase --ff-only) ; then
         echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling"
         exit 1
@@ -1519,7 +1522,7 @@
 if ! test -e ffmpeg ; then
     echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort"
     read tmp
-    if ! git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then
+    if ! git clone -b $FFBRANCH --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then
         rm -rf ffmpeg
         echo "Failed to get a FFmpeg checkout"
         echo "Please try again or put FFmpeg source code copy into ffmpeg/ manually."