mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-20 21:13:38 +08:00
Rename some URI variables for clarity
This commit is contained in:
committed by
popcornmix
parent
3ef4adc92f
commit
a50ce4cbc6
12
rpi-update
12
rpi-update
@@ -671,8 +671,8 @@ function noobs_fix {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_hash_date {
|
function get_hash_date {
|
||||||
local COMMITS_URI=${1}/commits/$2
|
local COMMITS_API_URI=${1}/commits/$2
|
||||||
eval curl ${CURL_OPTIONS_API} -s ${CURL_OPTIONS} "${COMMITS_URI}" | grep "date" | head -1 | awk -F\" '{print $4}'
|
eval curl ${CURL_OPTIONS_API} -s ${CURL_OPTIONS} "${COMMITS_API_URI}" | grep "date" | head -1 | awk -F\" '{print $4}'
|
||||||
}
|
}
|
||||||
|
|
||||||
function compare_hashes {
|
function compare_hashes {
|
||||||
@@ -687,14 +687,14 @@ function compare_hashes {
|
|||||||
|
|
||||||
function get_long_hash {
|
function get_long_hash {
|
||||||
# ask github for long version hash
|
# ask github for long version hash
|
||||||
local COMMITS_URI=${1}/commits/$2
|
local COMMITS_API_URI=${1}/commits/$2
|
||||||
eval curl ${CURL_OPTIONS_API} -s ${CURL_OPTIONS} "${COMMITS_URI}" | awk 'BEGIN {hash=""} { if (hash == "" && $1 == "\"sha\":") {hash=substr($2, 2, 40);} } END {print hash}'
|
eval curl ${CURL_OPTIONS_API} -s ${CURL_OPTIONS} "${COMMITS_API_URI}" | awk 'BEGIN {hash=""} { if (hash == "" && $1 == "\"sha\":") {hash=substr($2, 2, 40);} } END {print hash}'
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_diffs {
|
function print_diffs {
|
||||||
local diff_uri="$1"
|
local DIFF_API_URI="$1"
|
||||||
SEPARATOR="======================================================"
|
SEPARATOR="======================================================"
|
||||||
eval curl ${CURL_OPTIONS_API} -s ${CURL_OPTIONS} "${diff_uri}" | 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 ${CURL_OPTIONS_API} -s ${CURL_OPTIONS} "${DIFF_API_URI}" | awk -v SEPARATOR="${SEPARATOR}" -F\" ' { if ($2 == "commits") {commits=1} if (commits && $2 == "message") {print SEPARATOR "\nCommit: " $4} }' | sed 's/\\n\\n/\nCommit:\ /g'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user