checkenremote: improve github readme url detection
This commit is contained in:
parent
a31870d764
commit
27221b850f
@ -326,6 +326,10 @@ function checkenlist() {
|
||||
|
||||
function checkenremote() {
|
||||
local target_url=$(echo "$1" | sed 's/github.com/raw.githubusercontent.com/g' | sed 's;blob/;;')
|
||||
if [[ "$target_url" =~ "githubusercontent.com" && ! "$target_url" =~ "README" ]]; then
|
||||
target_url=$(echo "$target_url/master/README.md")
|
||||
fi
|
||||
arrow "checking $target_url"
|
||||
curl --location --insecure --silent "$target_url" > /tmp/file && checkenlist /tmp/file && write-good --no-passive /tmp/file && proselint /tmp/file && \cat /tmp/file > alex -q --stdin
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user