From 0638f71abfeb6fdff7bbfcad0457fea3667a632f Mon Sep 17 00:00:00 2001 From: Sebastian Fricke <sebastian.fricke@collabora.com> Date: Fri, 8 Sep 2023 18:22:51 +0200 Subject: [PATCH] build.sh: Enable to specify a custom branch from the dev repo There are multiple reasons why the branch might not be called main: - It could be called master - We might want to test a specific feature branch - When using GitLab or GitHub to test merge requests etc. Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> --- build.sh | 2 +- env.tmpl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 52fd069..27be85d 100755 --- a/build.sh +++ b/build.sh @@ -189,7 +189,7 @@ if [ "$1" == "setup" ]; then cd .. cd media-git - git remote add main $myrepo + git remote add $mybranch $myrepo if [ -n "$mylocalrepo" ]; then git remote add local $mylocalrepo fi diff --git a/env.tmpl b/env.tmpl index 8c98a4b..38363f6 100755 --- a/env.tmpl +++ b/env.tmpl @@ -5,6 +5,8 @@ # Your main git tree where you keep your in-progress work. # This will be named 'main'. myrepo=git://linuxtv.org/hverkuil/media_tree.git +# You can also specify a specific branch to checkout +#mybranch=example_branch # Optional: your local git tree where you do your development # This will be named 'local', so to build a branch from your -- GitLab