mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-20 21:13:38 +08:00
With JUST_CHECK indicate when firmware is being downgraded
This commit is contained in:
@@ -415,8 +415,13 @@ else
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [[ ${JUST_CHECK} -ne 0 ]]; then
|
if [[ ${JUST_CHECK} -ne 0 ]]; then
|
||||||
|
if $(compare_hashes ${LOCAL_HASH} lt ${FW_REV}); then
|
||||||
echo " *** Firmware update required. New commits available:"
|
echo " *** Firmware update required. New commits available:"
|
||||||
DIFF_API=${REPO_URI/github.com/api.github.com\/repos}/compare/${LOCAL_HASH}...${FW_REV}
|
DIFF_API=${REPO_URI/github.com/api.github.com\/repos}/compare/${LOCAL_HASH}...${FW_REV}
|
||||||
|
else
|
||||||
|
echo " *** Firmware downgrade requested. Commits to drop:"
|
||||||
|
DIFF_API=${REPO_URI/github.com/api.github.com\/repos}/compare/${FW_REV}...${LOCAL_HASH}
|
||||||
|
fi
|
||||||
SEPARATOR="======================================================"
|
SEPARATOR="======================================================"
|
||||||
eval curl -Ls ${GITHUB_AUTH_PARAM} ${DIFF_API} | awk -v SEPARATOR="${SEPARATOR}" -F\" ' { if ($2 == "commits") {commits=1} if (commits && $2 == "message") {print SEPARATOR "\nCommit: " $4} }' | sed 's/\\n\\n/\nCommit:\ /g'
|
eval curl -Ls ${GITHUB_AUTH_PARAM} ${DIFF_API} | awk -v SEPARATOR="${SEPARATOR}" -F\" ' { if ($2 == "commits") {commits=1} if (commits && $2 == "message") {print SEPARATOR "\nCommit: " $4} }' | sed 's/\\n\\n/\nCommit:\ /g'
|
||||||
exit 2
|
exit 2
|
||||||
|
|||||||
Reference in New Issue
Block a user