Skip to content

Commit

Permalink
fix umu runtime match
Browse files Browse the repository at this point in the history
  • Loading branch information
doZennn committed Oct 8, 2024
1 parent 8236f56 commit b8dbaf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ get_umu_url() {
'https://lutris.net/api/runtimes?format=json')
_api_exit=$?
if [ $_api_exit -eq 0 ]; then
_parsed_str="$(printf '%s' "$_api_resp" | awk -F'"' '/"name":"umu"/ {for(i=1; i<=NF; i++) if($i=="url") {print $(i+2); exit}}')"
_parsed_str="$(printf '%s' "$_api_resp" | awk -F'"name":"umu"' '{ split($2, urls, "url\":\""); print substr(urls[2], 1, index(urls[2], "\"")-1) }')"
# Validate parsed output
case $_parsed_str in
"https://"*)
*"umu-launcher"*)
printf '%s' "$_parsed_str"
exit 0
;;
Expand Down

0 comments on commit b8dbaf9

Please sign in to comment.