diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-08-31 21:41:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-09-01 18:36:07 +0300 |
commit | b1888e516c9c9d750726318227bf69856ec91b8b (patch) | |
tree | 446fa1cdd1a9a9bf1827eba2a4f5bac7876f65ad /brep/handler/submit/submit-git.bash.in | |
parent | d22f466823192963c22eb8f51ae930cb5af8fa9a (diff) |
Add ci-load
Diffstat (limited to 'brep/handler/submit/submit-git.bash.in')
-rw-r--r-- | brep/handler/submit/submit-git.bash.in | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/brep/handler/submit/submit-git.bash.in b/brep/handler/submit/submit-git.bash.in index c77f18d..b1bb357 100644 --- a/brep/handler/submit/submit-git.bash.in +++ b/brep/handler/submit/submit-git.bash.in @@ -127,10 +127,7 @@ function repository_base () # <repo-url> { # First, strip the URL query part, then component. # - sed -n \ --e 's%^\([^?]*\).*$%\1%' \ --e 's%^\(.*/\)[^/]\{1,\}/\{0,1\}$%\1%p' \ -<<<"$1" + sed -n -r -e 's%^([^?]*).*$%\1%' -e 's%^(.*/)[^/]+/?$%\1%p' <<<"$1" } # Authenticate the project name owner. Make sure that the control manifest @@ -296,7 +293,7 @@ function auth_package_unknown () # <package> <repo-dir> # function url_scheme () # <url> { - sed -n -e 's%^\(.*\)://.*$%\L\1%p' <<<"$1" + sed -n -re 's%^(.*)://.*$%\L\1%p' <<<"$1" } # Check that the repository properly responds to the probing request before @@ -320,8 +317,8 @@ function check_connectivity () # <repo-url> <timeout> <ours> if [ "$s" == "http" -o "$s" == "https" ]; then local u q - u="$(sed -n -e 's%^\([^?]*\).*$%\1%p' <<<"$url")" # Strips query part. - q="$(sed -n -e 's%^[^?]*\(.*\)$%\1%p' <<<"$url")" # Query part. + u="$(sed -n -re 's%^([^?]*).*$%\1%p' <<<"$url")" # Strips query part. + q="$(sed -n -re 's%^[^?]*(.*)$%\1%p' <<<"$url")" # Query part. if [ -z "$q" ]; then u="$u/info/refs?service=git-upload-pack" |