diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-03 21:39:44 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-08-03 22:07:28 +0300 |
commit | 15aae9d6ccad133defdb4270dbd6d76b7f370063 (patch) | |
tree | 1d90ffc2fd6d723589b2298b1033493d20093b97 /brep/handler/submit/submit-git.bash.in | |
parent | 0bbd98cffae9274936a0ac7cc579756182579e4e (diff) |
Make submit-git handler to authorize package owner without regards to potential .git extension in control repository URL
Diffstat (limited to 'brep/handler/submit/submit-git.bash.in')
-rw-r--r-- | brep/handler/submit/submit-git.bash.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/brep/handler/submit/submit-git.bash.in b/brep/handler/submit/submit-git.bash.in index a36164c..56cce33 100644 --- a/brep/handler/submit/submit-git.bash.in +++ b/brep/handler/submit/submit-git.bash.in @@ -211,7 +211,7 @@ function auth_package () # <project> <package> <control> <repo-dir> local prj="$1" local pkg="$2" - local ctl="$3" + local ctl="${3%.git}" # Strip the potential .git extension. local rep="$4" local d @@ -238,9 +238,11 @@ function auth_package () # <project> <package> <control> <repo-dir> # manifest_parser_start "$m" + # Match the control URL without regards to the potential .git extension. + # local n v while IFS=: read -ru "$manifest_parser_ofd" -d '' n v; do - if [ "$n" == "control" -a "$v" == "$ctl" ]; then + if [ "$n" == "control" -a "${v%.git}" == "$ctl" ]; then r="package" break fi |