Skip to content
Snippets Groups Projects
Commit 6276dfd4 authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

add parameter for checking out a specific git branch

parent fcbcac05
Branches
No related tags found
No related merge requests found
......@@ -12,10 +12,16 @@ function get_sources() {
# $1: source package name
# $2: git repository
# $3: (optional) specifc branch or tag
function get_git_sources() {
git clone $2 $1
cd $1
if [[ ! -z $3 ]] # checks if $3 is not empty
then
git checkout $3
else
git tag --sort "version:refname" -l | tail -n1 | xargs git checkout
fi
}
# $1: patch directory name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment