mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2025-02-20 16:26:05 +00:00
Apply suggestions from code review
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
This commit is contained in:
parent
bf84259a1f
commit
82e99d2142
|
@ -67,7 +67,16 @@ fetch_debian_latest_iso() {
|
|||
}
|
||||
|
||||
fetch_fedora_latest_iso() {
|
||||
FEDORA_URL=$(curl -s 'https://www.fedoraproject.org/releases.json' | jq -r '.[] | select(.version == "40" and .arch == "x86_64" and .variant == "Workstation") | select(.link | match(".*Live-x86_64*")) | .link')
|
||||
FEDORA_URL=$(curl -s 'https://www.fedoraproject.org/releases.json' |
|
||||
grep -o '"link": "[^"]*' |
|
||||
sed -e 's/"link": "//' |
|
||||
awk -v version="40" -v arch="x86_64" -v variant="Workstation" ' BEGIN { FS="," }
|
||||
{
|
||||
if ($0 ~ version && $0 ~ arch && $0 ~ variant && $0 ~ "Live-x86_64") {
|
||||
print $0
|
||||
}
|
||||
}' |
|
||||
head -n 1)
|
||||
printf "%b\n" "${GREEN} Selected Fedora Workstation (latest) ISO URL: ${RC} $FEDORA_URL"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user