docker_rpmbuild-rebuild_msmtp.sh : remove jq depencency
This commit is contained in:
parent
50dc6a19cd
commit
5ce09eabba
|
@ -8,30 +8,13 @@ cd ${ABSDIR}
|
|||
type -P docker >/dev/null && DOCKER=$(which docker)
|
||||
type -P podman >/dev/null && DOCKER=$(which podman)
|
||||
|
||||
if ! type -P jq >/dev/null ; then
|
||||
echo "Error : please install jq"
|
||||
if ! JSONLINE=$(curl -s https://src.fedoraproject.org/_dg/bodhi_updates/rpms/msmtp | grep -e "fc${FROMFEDORA}\","); then
|
||||
echo "ERROR : No msmtp release available for Fedora ${FROMFEDORA}"
|
||||
echo "Please check https://src.fedoraproject.org/rpms/msmtp to choose the right release."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TMPFILE=/tmp/fedoraproject_msmtp_$$
|
||||
|
||||
curl -s https://src.fedoraproject.org/_dg/bodhi_updates/rpms/msmtp -o ${TMPFILE}
|
||||
if ! jq -e .releases.F${FROMFEDORA} ${TMPFILE} >&/dev/null; then
|
||||
echo "ERROR : No msmtp release available for Fedora ${FROMFEDORA}"
|
||||
echo "Please check https://src.fedoraproject.org/rpms/msmtp to choose the right release."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if MSMTP=$(jq -re .updates.F${FROMFEDORA}.stable ${TMPFILE}); then
|
||||
echo "Found ${MSMTP} for Fedora ${FROMFEDORA}"
|
||||
else
|
||||
echo "ERROR : No stable msmtp release available for Fedora ${FROMFEDORA}."
|
||||
echo "Please check https://src.fedoraproject.org/rpms/msmtp to choose the right release."
|
||||
exit 3
|
||||
fi
|
||||
rm ${TMPFILE}
|
||||
|
||||
MSMTP_VERSION=$(echo "${MSMTP}" | sed -e "s/msmtp-\(.*\)\.fc${FROMFEDORA}$/\1/")
|
||||
MSMTP_VERSION=$(echo "${JSONLINE}" | sed -e "s/^\s*\"stable\": \"msmtp-\(.*\)\.fc${FROMFEDORA}\",\s*$/\1/")
|
||||
|
||||
ARCH=$(${DOCKER} run --rm docker.io/library/rockylinux:8 uname -i)
|
||||
|
||||
|
|
Loading…
Reference in a new issue