23 lines
964 B
Bash
23 lines
964 B
Bash
#!/usr/bin/env bash
|
|||
|
|
|
||
|
|
# Source-locked replacement for Armbian's rkbin-tools extension. The upstream
|
||
|
|
# extension follows branch:master, which makes otherwise pinned builds drift.
|
||
|
|
|
||
|
|
function fetch_sources_tools__rkbin_tools() {
|
||
|
|
: "${RK1_MEDIA_RKBIN_URL:?source-lock.env did not set RK1_MEDIA_RKBIN_URL}"
|
||
|
|
: "${RK1_MEDIA_RKBIN_COMMIT:?source-lock.env did not set RK1_MEDIA_RKBIN_COMMIT}"
|
||
|
|
fetch_from_repo "${RK1_MEDIA_RKBIN_URL}" "rkbin-tools" "commit:${RK1_MEDIA_RKBIN_COMMIT}"
|
||
|
|
}
|
||
|
|
|
||
|
|
function build_host_tools__install_rkbin_tools() {
|
||
|
|
cd "${SRC}/cache/sources/rkbin-tools" || exit
|
||
|
|
if [[ ! -f .commit_id || "$(improved_git rev-parse @ 2>/dev/null)" != "$(< .commit_id)" || ! -f /usr/local/bin/loaderimage ]]; then
|
||
|
|
display_alert "Installing" "source-locked rkbin tools" "info"
|
||
|
|
mkdir -p /usr/local/bin/
|
||
|
|
install -m 0755 tools/loaderimage /usr/local/bin/
|
||
|
|
install -m 0755 tools/trust_merger /usr/local/bin/
|
||
|
|
improved_git rev-parse @ 2>/dev/null > .commit_id
|
||
|
|
fi
|
||
|
|
}
|
||
|
|
|