Skip to content

Commit d748cb6

Browse files
ulfalizerandrewboie
authored andcommitted
tests: net: all: check_net_options.sh: Use lowercase for internal vars
This makes it possible to tell at a glance which variables are internal to the script and which ones are parameters to it, which is very helpful. This convention is pretty common. See e.g. Google's shell style guide at https://google.github.io/styleguide/shell.xml#Naming_Conventions, and https://github.com/icy/bash-coding-style#naming-and-styles. It's older than those though. Signed-off-by: Ulf Magnusson <[email protected]>
1 parent 0521eaf commit d748cb6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/net/all/check_net_options.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ if [ -z "$1" ]; then
1616
exit
1717
fi
1818

19-
BUILD_DIR="$1"
19+
build_dir="$1"
2020

21-
if [ ! -d $BUILD_DIR ]; then
22-
echo "Directory $BUILD_DIR not found!"
21+
if [ ! -d $build_dir ]; then
22+
echo "Directory $build_dir not found!"
2323
exit
2424
fi
2525

26-
KCONFIG_DIR=$BUILD_DIR/rst/doc/reference/kconfig
26+
kconfig_dir=$build_dir/rst/doc/reference/kconfig
2727

28-
if [ ! -d $KCONFIG_DIR ]; then
29-
echo "Kconfig documentation not found at $KCONFIG_DIR"
28+
if [ ! -d $kconfig_dir ]; then
29+
echo "Kconfig documentation not found at $kconfig_dir"
3030
exit
3131
fi
3232

3333
get_options()
3434
{
35-
cd $KCONFIG_DIR; ls CONFIG_DNS* CONFIG_NET* CONFIG_IEEE802154* | sed 's/\.rst//g'
35+
cd $kconfig_dir; ls CONFIG_DNS* CONFIG_NET* CONFIG_IEEE802154* | sed 's/\.rst//g'
3636
}
3737

3838
get_options | while read opt

0 commit comments

Comments
 (0)