Convert from perl regex to ext regex

This commit is contained in:
the-sane 2023-03-28 11:24:18 -04:00
parent 1c3bb8d61e
commit e30d304647

View File

@ -1389,7 +1389,7 @@ download_install() {
fi
# Get the selected download url
download_url="$(curl -s "$contributor_url$query_string" | grep -o "$search_key.*$download_file" | cut -d \" -f3)"
download_url="$(curl -s "$contributor_url$query_string" | grep -Eo "\"$search_key\": ?\"[^\"]+$download_file\"" | cut -d '"' -f4)"
# Sanity check
if [ -z "$download_url" ]; then
@ -1644,7 +1644,7 @@ download_select_install() {
unset download_versions
while IFS='' read -r line; do
download_versions+=("$line")
done < <(curl -s "$contributor_url$query_string" | grep -Po "$search_key.*?[^\\\](\",|\$)" | cut -d \" -f3 | xargs basename -a)
done < <(curl -s "$contributor_url$query_string" | grep -Eo "\"$search_key\": ?\"[^\"]+\"" | cut -d '"' -f4 | xargs basename -a)
# Note: match from search_key until ", or EOL (Handles embedded commas and escaped quotes)
# Sanity check