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,9 +925,13 @@ function git.download() {
|
||||
"${token_dirname/\/$git_branch*}"
|
||||
}
|
||||
|
||||
# function git.urldecode
|
||||
# url decodes a given string
|
||||
function git.urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||
|
||||
# function git.create_tarball
|
||||
# clone a git repository and convert is into a tarball file
|
||||
#
|
||||
#
|
||||
# args:
|
||||
# -d,--destdir : target directory
|
||||
# -v,--pck-version : package version
|
||||
@ -969,7 +973,7 @@ function git.create_tarball() {
|
||||
notify.debug "$FUNCNAME: pck_version = \"$pck_version\""
|
||||
;;
|
||||
--git-branch)
|
||||
git_branch="$2"; shift
|
||||
git_branch="`git.urldecode "$2"`"; shift
|
||||
if [ "${git_branch/@*}" != "${git_branch}" ]; then
|
||||
git_commit="${git_branch/*@}"
|
||||
git_branch="${git_branch/@*}"
|
||||
|
Loading…
Reference in New Issue
Block a user