Skip to content

Commit 727708b

Browse files
authored
fix: handle pclinuxos inconsistent naming (#1629)
* fix: handle inconsistent filenaming They name releases with a dash for mate and a dot for the others. No bets on when they notice this and make it consistent. In case they somehow get a dashed name first swap the dotty ones too.
1 parent 0c4e257 commit 727708b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

quickget

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,8 @@ function editions_parrotsec() {
923923
}
924924

925925
function releases_pclinuxos() {
926-
# shellcheck disable=SC2005
927-
echo $(web_pipe "https://ftp.fau.de/pclinuxos/pclinuxos/iso" | grep -m 1 -oP 'pclinuxos64-\K[^\-]+-\K[0-9]+\.[0-9]+' )
926+
# shellcheck disable=SC2046
927+
echo $(web_pipe "https://ftp.fau.de/pclinuxos/pclinuxos/iso" | grep -oP 'pclinuxos64-\K[^\-]+-\K[0-9]+\.[0-9]+' | head -n 1)
928928
}
929929

930930
function editions_pclinuxos() {
@@ -2328,10 +2328,17 @@ function get_parrotsec() {
23282328
}
23292329

23302330
function get_pclinuxos() {
2331-
# shellcheck disable=SC2155
2331+
case ${EDITION} in
2332+
mate) RELEASE="${RELEASE//./-}";;
2333+
# in case an edition is added that uses the mate style and sorts higher
2334+
kde|kde-darkstar) RELEASE="${RELEASE//-/.}";;
2335+
xfce) RELEASE="${RELEASE//-/.}";;
2336+
*) ;;
2337+
esac
2338+
# shellcheck disable=SC2155
23322339
local HASH="$(web_pipe "${URL}/pclinuxos64-${EDITION}-${RELEASE}.md5sum" | head -c 32)"
23332340
local ISO="pclinuxos64-${EDITION}-${RELEASE}.iso"
2334-
local URL="https://ftp.nluug.nl/os/Linux/distr/pclinuxos/pclinuxos/iso"
2341+
local URL="https://ftp.fau.de/pclinuxos/pclinuxos/iso"
23352342
echo "${URL}/${ISO} ${HASH}"
23362343
}
23372344

0 commit comments

Comments
 (0)