libnetwork.lib: support for url-decoding git tag so it works with i.e. 'subproject%2F1.0' for 'subproject/1.0'
This commit is contained in:
parent
4cd140d0a5
commit
4c108739a2
@ -925,6 +925,10 @@ function git.download() {
|
|||||||
"${token_dirname/\/$git_branch*}"
|
"${token_dirname/\/$git_branch*}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# function git.urldecode
|
||||||
|
# url decodes a given string
|
||||||
|
function git.urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||||
|
|
||||||
# function git.create_tarball
|
# function git.create_tarball
|
||||||
# clone a git repository and convert is into a tarball file
|
# clone a git repository and convert is into a tarball file
|
||||||
#
|
#
|
||||||
@ -969,7 +973,7 @@ function git.create_tarball() {
|
|||||||
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
|
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
|
||||||
;;
|
;;
|
||||||
--git-branch)
|
--git-branch)
|
||||||
git_branch="$2"; shift
|
git_branch="`git.urldecode "$2"`"; shift
|
||||||
if [ "${git_branch/@*}" != "${git_branch}" ]; then
|
if [ "${git_branch/@*}" != "${git_branch}" ]; then
|
||||||
git_commit="${git_branch/*@}"
|
git_commit="${git_branch/*@}"
|
||||||
git_branch="${git_branch/@*}"
|
git_branch="${git_branch/@*}"
|
||||||
|
Loading…
Reference in New Issue
Block a user