Skip to content

Commit c9c680c

Browse files
committed
fix: android 16KB alignment check paths
1 parent d03d896 commit c9c680c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/check-16kb.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,23 @@ if [ -z "$readelf_cmd" ]; then
4444
fi
4545

4646
readelf_args=(-l -W)
47+
search_roots=(android/build example/android/build example/android/app/build)
4748
files=()
4849
if command -v rg >/dev/null 2>&1; then
4950
rg_load_align() { rg -n "LOAD|Align"; }
5051
while IFS= read -r line; do
5152
[ -n "$line" ] && files+=("$line")
52-
done < <(rg --files -g "libfilehash-native.so" android/build example/android/build || true)
53+
done < <(rg --files -g "libfilehash-native.so" "${search_roots[@]}" || true)
5354
else
5455
rg_load_align() { grep -n -E "LOAD|Align"; }
5556
while IFS= read -r line; do
5657
[ -n "$line" ] && files+=("$line")
57-
done < <(find android/build example/android/build -name "libfilehash-native.so" 2>/dev/null || true)
58+
done < <(find "${search_roots[@]}" -name "libfilehash-native.so" 2>/dev/null || true)
5859
fi
5960

6061
if [ "${#files[@]}" -eq 0 ]; then
6162
echo "ERROR: no libfilehash-native.so found; build Android first" >&2
63+
echo "Searched: ${search_roots[*]}" >&2
6264
exit 1
6365
fi
6466

0 commit comments

Comments
 (0)