diff options
Diffstat (limited to 'utils/nwztools/database/nvp/parse_all_nvp_headers.sh')
-rwxr-xr-x | utils/nwztools/database/nvp/parse_all_nvp_headers.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/utils/nwztools/database/nvp/parse_all_nvp_headers.sh b/utils/nwztools/database/nvp/parse_all_nvp_headers.sh new file mode 100755 index 0000000000..e84eaae8f5 --- /dev/null +++ b/utils/nwztools/database/nvp/parse_all_nvp_headers.sh | |||
@@ -0,0 +1,33 @@ | |||
1 | # | ||
2 | # usage: parse_all_nvp_headers /path/to/directory | ||
3 | # | ||
4 | # the expected structure is: | ||
5 | # nwz-*/<kernel> | ||
6 | # nw-*/<kernel/ | ||
7 | # where <kernel> must be of the form | ||
8 | # linux-kernel-*.tgz | ||
9 | # | ||
10 | if [ "$#" -lt 1 ]; then | ||
11 | >&2 echo "usage: parse_all_nvp_header.sh /path/to/directory" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | # list interesting directories | ||
16 | for dir in `find "$1" -maxdepth 1 -name "nw-*" -or -name "nwz-*"` | ||
17 | do | ||
18 | # extract codename | ||
19 | codename=`basename "$dir"` | ||
20 | # only consider linux based targets | ||
21 | if [ -e "$dir/not_linux" ]; then | ||
22 | #echo "$codename: not linux based" | ||
23 | continue | ||
24 | fi | ||
25 | # check if we can find a kernel | ||
26 | kernel_tgz=`find "$dir" -maxdepth 1 -name "linux-kernel-*.tgz"` | ||
27 | if [ "$kernel_tgz" == "" ]; then | ||
28 | echo "$codename: no kernel found" | ||
29 | continue | ||
30 | fi | ||
31 | echo "$codename: found kernel `basename $kernel_tgz`" | ||
32 | ./parse_nvp_header.sh "$kernel_tgz" > "$codename.txt" | ||
33 | done | ||