17 lines
665 B
Bash
17 lines
665 B
Bash
#!/usr/bin/env bash
|
|
# SPDX-License-Identifier: MIT
|
|
# Avoid a runner-local cache download when the pinned image has this source.
|
|
set -euo pipefail
|
|
|
|
prefix="${WX_PREFIX:?WX_PREFIX is required}"
|
|
expected="$(awk '$1 == "sha256:" {print $2}' thirdparty/wxwidgets/VERSION)"
|
|
[[ "$expected" =~ ^[0-9a-f]{64}$ ]]
|
|
available=false
|
|
if [ ! -L "$prefix" ] && [ ! -L "$prefix/.alkane-source-sha256" ] &&
|
|
[ -x "$prefix/bin/wx-config" ] &&
|
|
[ -s "$prefix/lib/libwx_gtk3u-3.3.a" ] &&
|
|
[ "$(cat "$prefix/.alkane-source-sha256" 2>/dev/null || true)" = "$expected" ]; then
|
|
available=true
|
|
fi
|
|
printf 'available=%s\n' "$available" >> "${GITHUB_OUTPUT:?GITHUB_OUTPUT is required}"
|