17 lines
537 B
Bash
Executable File
17 lines
537 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
test "$#" -gt 0 || { printf 'Usage: %s FILE...\n' "$0" >&2; exit 2; }
|
|
. "$(dirname -- "$0")/setup-ohos-env.sh"
|
|
|
|
for artifact in "$@"; do
|
|
test -f "$artifact" || { printf 'Missing artifact: %s\n' "$artifact" >&2; exit 1; }
|
|
description=$(file "$artifact")
|
|
header=$($READELF -h "$artifact")
|
|
printf '%s\n%s\n' "$description" "$header"
|
|
printf '%s\n' "$description" | grep -q 'ELF 64-bit LSB'
|
|
printf '%s\n' "$header" | grep -q 'Machine:.*AArch64'
|
|
$READELF -d "$artifact" 2>/dev/null || true
|
|
done
|