git: 628c61939ecc - main - Scripts/split-url.awk: Pass result array as parameter
Tobias Kortkamp
tobik at FreeBSD.org
Wed Sep 8 19:07:17 UTC 2021
The branch main has been updated by tobik:
URL: https://cgit.FreeBSD.org/ports/commit/?id=628c61939eccbfd4b4f5e11059ffc399701edd92
commit 628c61939eccbfd4b4f5e11059ffc399701edd92
Author: Tobias Kortkamp <tobik at FreeBSD.org>
AuthorDate: 2021-09-08 18:37:02 +0000
Commit: Tobias Kortkamp <tobik at FreeBSD.org>
CommitDate: 2021-09-08 19:05:19 +0000
Scripts/split-url.awk: Pass result array as parameter
---
Mk/Scripts/cargo-crates.awk | 2 +-
Mk/Scripts/split-url.awk | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Mk/Scripts/cargo-crates.awk b/Mk/Scripts/cargo-crates.awk
index 7a17e746a945..56b3beafac11 100644
--- a/Mk/Scripts/cargo-crates.awk
+++ b/Mk/Scripts/cargo-crates.awk
@@ -48,7 +48,7 @@ function add_crate() {
!gh_tuple_seen[$0] && /^source = "git\+(https|http|git):\/\/.*\/.*#.*"/ {
gh_tuple_seen[$0] = 1
- split_url(substr($3, 1 + length("\"git+"), length($3) - 1 - length("\"git+")))
+ split_url(url, substr($3, 1 + length("\"git+"), length($3) - 1 - length("\"git+")))
split(url["path"], path, "/")
account = path[2]
diff --git a/Mk/Scripts/split-url.awk b/Mk/Scripts/split-url.awk
index 8efc1b9c002a..d9adad8e7bcb 100644
--- a/Mk/Scripts/split-url.awk
+++ b/Mk/Scripts/split-url.awk
@@ -1,4 +1,4 @@
-function join_url( s, query_keys, i) {
+function join_url(url, s, query_keys, i) {
s = url["scheme"] "://"
if (url["user"]) {
s = s url["user"]
@@ -30,7 +30,7 @@ function join_url( s, query_keys, i) {
return s
}
-function split_url(s, url_scheme, url_fragment, url_query, url_query_parts, i, url_query_part, url_authority, url_auth, url_user, url_host) {
+function split_url(url, s, url_scheme, url_fragment, url_query, url_query_parts, i, url_query_part, url_authority, url_auth, url_user, url_host) {
delete url
# scheme:[//[user[:password]@]host[:port]][/path][?query][#fragment]
split(s, url_scheme, "://")
More information about the dev-commits-ports-all
mailing list