system dep pre-check

This commit is contained in:
shocknet-justin 2025-08-30 14:50:13 -04:00
parent 720c5cf2e8
commit e426141657
2 changed files with 10 additions and 0 deletions

View file

@ -56,6 +56,7 @@ for module in "${modules[@]}"; do
done
detect_os_arch
check_deps
log "Detected OS: $OS"
log "Detected ARCH: $ARCH"

View file

@ -27,3 +27,12 @@ detect_os_arch() {
SYSTEMCTL_AVAILABLE=false
fi
}
check_deps() {
for cmd in wget grep stat tar sha256sum; do
if ! command -v $cmd &> /dev/null; then
log "Missing system dependency: $cmd. Install $cmd via your package manager and retry."
exit 1
fi
done
}