mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-28 17:34: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
|
else
|
||||||
message info "Lutris does not appear to be running."
|
message info "Lutris does not appear to be running."
|
||||||
fi
|
fi
|
||||||
lutris_needs_restart="false"
|
|
||||||
fi
|
fi
|
||||||
|
lutris_needs_restart="false"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -713,10 +713,16 @@ runner_install() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
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_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
|
# Sanity check
|
||||||
if [ -z "$runner_url" ]; then
|
if [ -z "$runner_url" ]; then
|
||||||
message warning "Could not find the requested runner. The Github API may be down or rate limited."
|
message warning "Could not find the requested runner. The Github API may be down or rate limited."
|
||||||
|
Loading…
Reference in New Issue
Block a user