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

Updated manjaro fetching as migrated to new system #742

Merged
merged 5 commits into from
Oct 16, 2023
Merged
Changes from 4 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
40 changes: 33 additions & 7 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -469,18 +469,23 @@ function editions_mxlinux(){
echo Xfce KDE Fluxbox
}

function editions_manjaro(){
echo full minimal
}

function releases_macos() {
echo high-sierra mojave catalina big-sur monterey ventura
}

function releases_manjaro() {
echo xfce \
gnome \
kde \
plasma \
budgie \
cinnamon \
i3 \
mate
mate \
sway
}

function releases_netboot() {
Expand Down Expand Up @@ -1488,18 +1493,30 @@ function get_mageia() {
}

function get_manjaro() {
local EDITION="${1:-}"
local HASH=""
local ISO=""
local MANIFESTURL=""
local MANIFEST=""
local URL=""
local TYPE=""

case ${RELEASE} in
gnome|kde|xfce) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/official/${RELEASE}.md";;
budgie|cinnamon|deepin|i3|mate) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/community/${RELEASE}.md";;
sway) MANIFEST="$( wget -qO- https://mirror.manjaro-sway.download/manjaro-sway/release.json )";;
gnome|xfce|plasma) TYPE="official";;
*) TYPE="community";;
esac

URL="$(wget -qO- "${MANIFESTURL}" | grep "Download_x64 =" | cut -d'"' -f2)"
HASH=$(wget -qO- "${MANIFESTURL}" | grep "Download_x64_Checksum =" | cut -d'"' -f2)
[[ ${RELEASE} != "sway" ]] && MANIFEST="$(wget -qO- https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)"

[[ ${EDITION} == "minimal" && ${TYPE} != "sway" ]] && EDITION=".minimal" || EDITION=""

if [[ ${RELEASE} != "sway" ]]; then
URL="$(echo ${MANIFEST} | jq -r .${TYPE}.${RELEASE}${EDITION}.image)"
else
URL="echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL=$(echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url')

fi

HASH=$(wget -qO- "${URL}.sha512" | cut -d' ' -f1)
echo "${URL} ${HASH}"
}

Expand Down Expand Up @@ -2290,6 +2307,15 @@ if [ -n "${2}" ]; then
fi
fi

# Handle missing Mangaro Sway minimal
if [[ $OS == manjaro ]] ; then
if [[ ${RELEASE} == "sway" && ${EDITION} == "minimal" ]] ; then
echo "ERROR! Unsupported combination"
echo " Manjaro Sway does not have a minimal edition"
exit 1;
fi
fi


VM_PATH="${OS}-${RELEASE}-${EDITION}"
validate_release "releases_${OS}"
Expand Down