Skip to content
Snippets Groups Projects
Commit 1e6746be authored by ghuter's avatar ghuter
Browse files

configure.sh: avoid cd(1) and ls(1) in ls_sensors()

parent 44b132bf
Branches
Tags
2 merge requests!9fix sensor example (doc),!5Add dev name to labels
......@@ -43,16 +43,16 @@ usage() {
}
ls_sensors() {
try cd src
[ -d src ] || die 'fatal: the "src" directory does not exit.'
[ -z "$hdr_whitelist" ] && hdr_whitelist='.*'
dprint hdr_blacklist >&2
dprint hdr_whitelist >&2
ls -1 *.h |
grep -xEv "($hdr_blacklist)\.h" |
grep -xE "($hdr_whitelist)\.h" |
sed 's/\.h$//'
try find src -type f -name '*.h' |
sed 's,src/\(.*\)\.h,\1,' |
grep -xEv "($hdr_blacklist)" |
grep -xE "($hdr_whitelist)"
}
# gen_sensors_h(sensor, nb_sensors)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment