Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(solus): update Solus URLs #1496

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -982,12 +982,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 @@ -1160,6 +1160,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 @@ -2401,7 +2406,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