Files
Adam Shiervani 1eea5e6bbc chore(scripts): simplify flash/build helpers and dedupe arg/device checks (#67)
- flash_system.sh: rename ota_tar -> system_tar (path is staged
  release-artifacts/<sku>/system.tar, not output/image/update_ota.tar)
  and only re-check device reachability after a --build, not on every
  invocation.
- common.sh: add require_arg and prompt for SKU via normalize_system_sku
  so aliases live in one place; align FLASH_SKU/SYSTEM_SKU precedence
  between build_system.sh and flash_system.sh.
- check_device.sh (new): one wrapper around check_ping/check_ssh used
  by both make check_device and direct CLI, removing the Makefile's
  hardcoded ping -c 1 / root@ duplication.
- release_r2.sh, release_github.sh, run_e2e_tests.sh, build_system.sh,
  flash_system.sh: route all value-taking options through require_arg
  for consistent missing-arg errors.
2026-05-11 10:19:09 +02:00

20 lines
400 B
Bash
Executable File

#!/usr/bin/env bash
set -e
set -o pipefail
SCRIPT_DIR=$(realpath "$(dirname "$(realpath "${BASH_SOURCE[0]}")")")
source "${SCRIPT_DIR}/common.sh"
DEVICE_IP="${DEVICE_IP:-}"
DEVICE_USER="${DEVICE_USER:-root}"
if [ -z "$DEVICE_IP" ]; then
msg_err "Error: DEVICE_IP is required"
msg_err "Usage: DEVICE_IP=<ip> $0"
exit 1
fi
check_ping "$DEVICE_IP"
check_ssh "$DEVICE_USER" "$DEVICE_IP"