mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-28 16:44:23 +00:00
Fix url parsing
Be more specific for when grep returns multiple matches
This commit is contained in:
parent
6d7c84c8b6
commit
8f3efd0b9c
@ -650,8 +650,8 @@ lutris_restart() {
|
||||
else
|
||||
message info "Lutris does not appear to be running."
|
||||
fi
|
||||
lutris_needs_restart="false"
|
||||
fi
|
||||
lutris_needs_restart="false"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -713,9 +713,15 @@ runner_install() {
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Use menu selection from last menu to select version from array
|
||||
# Store the selected runner name and url
|
||||
runner_name="${runner_versions[$1]}"
|
||||
runner_url="$(curl -s "$latest_url" | grep "browser_download_url.*$runner_name" | cut -d \" -f4)"
|
||||
if [ "$latest_url" = "$snatella_url" ]; then
|
||||
# Runners with .tgz file extension
|
||||
runner_url="$(curl -s "$latest_url" | grep "browser_download_url.*$runner_name.tgz" | cut -d \" -f4)"
|
||||
else
|
||||
# Runners with .tar.gz file extension
|
||||
runner_url="$(curl -s "$latest_url" | grep "browser_download_url.*$runner_name.tar.gz" | cut -d \" -f4)"
|
||||
fi
|
||||
|
||||
# Sanity check
|
||||
if [ -z "$runner_url" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user