olabusayoT commented on code in PR #11:
URL:
https://github.com/apache/daffodil-infrastructure/pull/11#discussion_r2310696282
##########
containers/check-release/src/check-release.sh:
##########
@@ -22,6 +22,31 @@ then
exit 1
fi
+download_dir() {
+ # force a trailing slash by removing a slash it if exists and then
adding
+ # it back. This is required for maven URLs to download the right
thing--it
+ # doesn't matter either way for dist urls
+ URL="${1%/}/"
+ # non-greedily delete the schema and domain part of the URL, giving just
+ # the path part
+ URL_PATH="${URL#*://*/}"
+ # we want to use --cut-dirs to ignore all directories but the final
target
+ # directory. This number is different depending on the URL, so we
extract
+ # and count the nubmer of slash-separated fields of the url path and
+ # subtract 2 (one because we want to keep the last field, and one
because
+ # we there is an extra field because the path ends in a slash)
+ CUT_DIRS=$(echo "$URL_PATH" | awk -F/ '{print NF - 2}')
Review Comment:
typo: s/we//
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]