Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
infra
packages
Commits
6276dfd4
Commit
6276dfd4
authored
Jul 20, 2019
by
Hinrikus Wolf
Browse files
add parameter for checking out a specific git branch
parent
fcbcac05
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/common.sh
View file @
6276dfd4
...
@@ -12,10 +12,16 @@ function get_sources() {
...
@@ -12,10 +12,16 @@ function get_sources() {
# $1: source package name
# $1: source package name
# $2: git repository
# $2: git repository
# $3: (optional) specifc branch or tag
function
get_git_sources
()
{
function
get_git_sources
()
{
git clone
$2
$1
git clone
$2
$1
cd
$1
cd
$1
git tag
--sort
"version:refname"
-l
|
tail
-n1
| xargs git checkout
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
# $1: patch directory name
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment