diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2013-12-26 12:16:26 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2013-12-26 12:17:06 +0000 |
commit | d2e595364327ca77b198f54d0126fbe7041ba47c (patch) | |
tree | 429333e76d4db4c2a70025775edd28e5759e02a7 /scripts | |
parent | 2cbab400b2b64481d7ba4d4645d42ec6598850cb (diff) |
scripts: create-uninstalled-setup: re-use existing master branch if it exists
When creating separate checkout for non-master branches.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/create-uninstalled-setup.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/create-uninstalled-setup.sh b/scripts/create-uninstalled-setup.sh index 52350bfcd..462ff1d3c 100755 --- a/scripts/create-uninstalled-setup.sh +++ b/scripts/create-uninstalled-setup.sh @@ -29,12 +29,16 @@ set -e -# set BRANCH to "0.10" for a GStreamer 0.10.x checkout +# set BRANCH to e.g. "1.2" to track the stable 1.2 branch instead of master BRANCH="master" # set to "ssh" if you have a developer account and ssh access GIT_ACCESS="anongit" +# re-use and reference local master branch checkout if one already exists +# (saves network bandwidth) +REUSE_EXISTING_MASTER_CHECKOUT="true" + # git modules to clone MODULES="gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-plugins-bad" @@ -97,10 +101,17 @@ cd $UNINSTALLED_ROOT/$BRANCH for m in $MODULES do + REF="" + if test "$BRANCH" != "master" \ + -a "x$REUSE_EXISTING_MASTER_CHECKOUT" = "xtrue" \ + -a -d ../master/$m; then + REF="--reference=../master/$m" + fi + if test "$GIT_ACCESS" = "ssh"; then - git clone ssh://git.freedesktop.org/git/gstreamer/$m + git clone $REF ssh://git.freedesktop.org/git/gstreamer/$m else - git clone git://anongit.freedesktop.org/gstreamer/$m + git clone $REF git://anongit.freedesktop.org/gstreamer/$m fi cd $m |