mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-28 17:34:23 +00:00
Convert from perl regex to ext regex
This commit is contained in:
parent
1c3bb8d61e
commit
e30d304647
@ -1389,7 +1389,7 @@ download_install() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the selected download url
|
# 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
|
# Sanity check
|
||||||
if [ -z "$download_url" ]; then
|
if [ -z "$download_url" ]; then
|
||||||
@ -1644,7 +1644,7 @@ download_select_install() {
|
|||||||
unset download_versions
|
unset download_versions
|
||||||
while IFS='' read -r line; do
|
while IFS='' read -r line; do
|
||||||
download_versions+=("$line")
|
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)
|
# Note: match from search_key until ", or EOL (Handles embedded commas and escaped quotes)
|
||||||
|
|
||||||
# Sanity check
|
# Sanity check
|
||||||
|
Loading…
Reference in New Issue
Block a user