Skip to content

Commit f9587e0

Browse files
fredoh9marc-hb
authored andcommitted
env-check: display optional octave package dependency
check-volume-levels.sh needs octave packages, display optional help messages. Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
1 parent 8af0a79 commit f9587e0

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

env-check.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ mydir=$(cd "$(dirname "$0")"; pwd)
88
DYNDBG="/etc/modprobe.d/sof-dyndbg.conf"
99

1010
# check for the system package
11-
out_str=""
1211
func_check_pkg(){
1312
if command -v "$1" >/dev/null; then
1413
return
@@ -46,7 +45,7 @@ func_check_exec_binary() {
4645
fi
4746
}
4847

49-
check_res=0
48+
out_str="" check_res=0
5049
printf "Checking for some OS packages:\t\t"
5150
func_check_pkg expect
5251
func_check_pkg aplay
@@ -67,6 +66,22 @@ else
6766
printf "$out_str"
6867
fi
6968

69+
# octave packages are required only for check-volume-levels.sh
70+
# Good to check upfront but this can be optional requirement
71+
out_str="" check_res=0
72+
func_check_pkg octave
73+
func_check_pkg octave-signal
74+
func_check_pkg octave-io
75+
if [ $check_res -eq 0 ]; then
76+
printf "pass for Octave packages\n"
77+
else
78+
printf 'Optional: Octave packages are required for check-volume-levels.sh\n'
79+
# Need ANSI color characters to be the format string. This is not
80+
# unsanitized input.
81+
# shellcheck disable=SC2059
82+
printf "$out_str"
83+
fi
84+
7085
# check for the tools folder
7186
out_str="" check_res=0
7287
echo -ne "Checking exec permissions in tools/ directory:\t\t"

0 commit comments

Comments
 (0)