Iomatex_OS/offline/require-local.sh

13 lines
723 B
Bash

#!/usr/bin/env bash
# Shared package-source owner for every installer; no external APT recovery.
IOMATEX_PROJECT_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
IOMATEX_PACKAGE_BUNDLE="$IOMATEX_PROJECT_ROOT/third_party/debian/bullseye-arm64"
if [[ ${EUID:-$(id -u)} -eq 0 ]]; then
[[ -f "$IOMATEX_PACKAGE_BUNDLE/SHA256SUMS" ]] || {
echo 'ERROR: incomplete Iomatex_OS checkout: third_party packages missing; fetch the complete repository from our Git.' >&2
exit 1
}
command -v python3 >/dev/null || { echo 'ERROR: the supported Debian vendor image must include Python 3 for bundle verification.' >&2; exit 1; }
python3 "$IOMATEX_PROJECT_ROOT/offline/activate.py" "$IOMATEX_PACKAGE_BUNDLE" || exit 1
fi