refactor: update manjaro to use web_pipe()
This commit is contained in:
parent
de7dca9b90
commit
fb6484588c
6
quickget
6
quickget
|
@ -2473,18 +2473,18 @@ function get_manjaro() {
|
||||||
local URL=""
|
local URL=""
|
||||||
local TYPE=""
|
local TYPE=""
|
||||||
case ${RELEASE} in
|
case ${RELEASE} in
|
||||||
sway) MANIFEST="$( wget -qO- https://mirror.manjaro-sway.download/manjaro-sway/release.json )";;
|
sway) MANIFEST="$(web_pipe https://mirror.manjaro-sway.download/manjaro-sway/release.json)";;
|
||||||
gnome|xfce|plasma) TYPE="official";;
|
gnome|xfce|plasma) TYPE="official";;
|
||||||
*) TYPE="community";;
|
*) TYPE="community";;
|
||||||
esac
|
esac
|
||||||
[[ ${RELEASE} != "sway" ]] && MANIFEST="$(wget -qO- https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)"
|
[[ ${RELEASE} != "sway" ]] && MANIFEST="$(web_pipe https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)"
|
||||||
[[ ${EDITION} == "minimal" && ${TYPE} != "sway" ]] && EDITION=".minimal" || EDITION=""
|
[[ ${EDITION} == "minimal" && ${TYPE} != "sway" ]] && EDITION=".minimal" || EDITION=""
|
||||||
if [[ ${RELEASE} != "sway" ]]; then
|
if [[ ${RELEASE} != "sway" ]]; then
|
||||||
URL="$(echo ${MANIFEST} | jq -r .${TYPE}.${RELEASE}${EDITION}.image)"
|
URL="$(echo ${MANIFEST} | jq -r .${TYPE}.${RELEASE}${EDITION}.image)"
|
||||||
else
|
else
|
||||||
URL=$(echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url')
|
URL=$(echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url')
|
||||||
fi
|
fi
|
||||||
HASH=$(wget -qO- "${URL}.sha512" | cut_1)
|
HASH=$(web_pipe "${URL}.sha512" | cut_1)
|
||||||
echo "${URL} ${HASH}"
|
echo "${URL} ${HASH}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue