-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathassert_ndk_files.sh
executable file
·65 lines (57 loc) · 1.18 KB
/
assert_ndk_files.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
set -o pipefail
set -o nounset
source "known_apis.sh"
failed=false
ndks=()
if [ -z "${ndk+x}" ]
then
ndks=(${known_ndks_ndk_only[@]})
else
if ! [[ ${known_ndks_ndk_only[@]} =~ "${ndk}" ]]
then
echo "$ndk is invalid !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 0
fi
ndks=($ndk)
fi
archs=()
if [ -z "${arch+x}" ]
then
arches=(${known_archs[@]})
else
arches=($arch)
fi
for ndk in ${ndks[@]}
do
dir="android-ndk-$ndk"
if [ -d $dir ]
then
for arch in ${arches[@]}
do
echo "$ndk-$arch ======================================================================"
known_apis_name="known_apis_${ndk}_${arch}"
declare -n known_apis=$known_apis_name
this_failed=false
for api in ${known_apis[@]}
do
ndk=$ndk arch=$arch api=$api bash assert_ndk_files_for.sh
if [ $? -ne 0 ]
then
this_failed=true
failed=true
fi
done
if ! $this_failed
then
echo "OK"
fi
done
else
echo "$dir not present !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi
done
if $failed
then
exit 1
fi