2019-04-13 17:20:08 +08:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Copyright (c) 2019 Intel Corporation.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
if [ -z "$1" ]; then
|
|
|
|
echo "Usage: $0 <doc build directory>"
|
|
|
|
echo
|
|
|
|
echo "The parameter needs to point to a directory where Zephyr html"
|
|
|
|
echo "documentation is generated."
|
|
|
|
echo "Typically this is $ZEPHYR_BASE/doc/_build"
|
|
|
|
echo
|
|
|
|
echo "This script will generate a list of networking related Kconfig options"
|
|
|
|
echo "that are missing from prj.conf file."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2019-11-23 04:23:42 +08:00
|
|
|
build_dir="$1"
|
2019-04-13 17:20:08 +08:00
|
|
|
|
2019-11-23 04:23:42 +08:00
|
|
|
if [ ! -d $build_dir ]; then
|
|
|
|
echo "Directory $build_dir not found!"
|
2019-04-13 17:20:08 +08:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2019-11-23 04:23:42 +08:00
|
|
|
kconfig_dir=$build_dir/rst/doc/reference/kconfig
|
2019-04-13 17:20:08 +08:00
|
|
|
|
2019-11-23 04:23:42 +08:00
|
|
|
if [ ! -d $kconfig_dir ]; then
|
|
|
|
echo "Kconfig documentation not found at $kconfig_dir"
|
2019-04-13 17:20:08 +08:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
get_options()
|
|
|
|
{
|
2019-11-23 04:23:42 +08:00
|
|
|
cd $kconfig_dir; ls CONFIG_DNS* CONFIG_NET* CONFIG_IEEE802154* | sed 's/\.rst//g'
|
2019-04-13 17:20:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
get_options | while read opt
|
|
|
|
do
|
|
|
|
grep -q $opt prj.conf > /dev/null 2>&1
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "$opt"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "Total number of options : `get_options | wc -w`" > /dev/tty
|