Skip to content

Commit

Permalink
fix(solus): update Solus URLs
Browse files Browse the repository at this point in the history
The latest Solus release has changed the naming of ISOs:

- Update all related functions to support the ISO name
  format used in the latest release.
- Use the directory listings in order to support more releases in the future.
  • Loading branch information
silkeh authored and flexiondotorg committed Dec 30, 2024
1 parent 373f133 commit 6527083
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -1006,12 +1006,12 @@ function releases_slitaz() {

function releases_solus() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://getsol.us/download/" | grep "isos" | grep Download | cut -d'-' -f 2 | sort -ru)
echo $(web_pipe_json "https://downloads.getsol.us/isos/" | jq -r '.[].name[:-1]' | grep -E "^[0-9-]+$" | sort -u)
}

function editions_solus() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://getsol.us/download/" | grep "isos" | grep Download | cut -d'.' -f5 | cut -d'-' -f2- | sort -u)
echo $(web_pipe_json "https://downloads.getsol.us/isos/$(releases_solus | tail -n1)/" | jq -r '.[].name | sub("Solus-(?<e>.*)-Release-.*"; "\(.e)")' | sort -u)
}

function releases_sparkylinux() {
Expand Down Expand Up @@ -1184,6 +1184,11 @@ function web_pipe() {
curl --silent --location "${1}"
}

# Download a JSON file from the web and pipe it to stdout
function web_pipe_json() {
curl --silent --location --header "Accept: application/json" "${1}"
}

# Download a file from the web
function web_get() {
local CHECK=""
Expand Down Expand Up @@ -2461,7 +2466,7 @@ function get_slitaz() {

function get_solus() {
local HASH=""
local ISO="Solus-${RELEASE}-${EDITION}.iso"
local ISO="Solus-${EDITION}-Release-${RELEASE}.iso"
local URL="https://downloads.getsol.us/isos/${RELEASE}"
HASH=$(web_pipe "${URL}/${ISO}.sha256sum" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}"
Expand Down

0 comments on commit 6527083

Please sign in to comment.