test jq rebornos

This commit is contained in:
zenobit 2025-03-03 20:21:15 +01:00
parent 7210af2751
commit 90d7483634
3 changed files with 19 additions and 6 deletions

View File

@ -12,8 +12,14 @@ function releases_() {
function get_() {
local JSON ISO HASH
JSON=$(curl -s "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json") || return 1
ISO=$(echo "$JSON" | jq -r ".url")
JSON=$(web_pipe "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json")
if ! echo "$JSON" | jq . > /dev/null 2>&1; then
echo "JSON not valid!" >&2
echo "DEBUG: JSON response:" >&2
echo "$JSON" >&2
fi
URL=$(echo "$JSON" | jq -r ".url")
ISO=$(echo "${URL}" | cut -d'/' -f3)
HASH=$(echo "$JSON" | jq -r ".md5")
echo "${ISO} ${HASH}"
echo "${URL} ${HASH}"
}

View File

@ -16,9 +16,15 @@ function releases_() {
function get_() {
local JSON ISO HASH
JSON=$(curl -s "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json") || return 1
ISO=$(echo "$JSON" | jq -r ".url")
JSON=$(web_pipe "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json")
if ! echo "$JSON" | jq . > /dev/null 2>&1; then
echo "JSON not valid!" >&2
echo "DEBUG: JSON response:" >&2
echo "$JSON" >&2
fi
URL=$(echo "$JSON" | jq -r ".url")
ISO=$(echo "${URL}" | cut -d'/' -f3)
HASH=$(echo "$JSON" | jq -r ".md5")
echo "${ISO} ${HASH}"
echo "${URL} ${HASH}"
}

1
public/tmp_rebornos Normal file
View File

@ -0,0 +1 @@
rebornos latest: https://cdn.soulharsh007.dev/RebornOS-ISO/rebornos_iso-2024.08.03-x86_64.iso