mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-27 09:14:18 +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
|
||||
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user