Sign in
zircon-guest
/
third_party
/
linux
/
36566e5a622d6de6dc2dcd55c166fbbb10a82b25
/
.
/
tools
/
perf
/
trace
/
beauty
/
kcmp_type.sh
blob: 40d063b8c0820075a3173277e724bf88e2297825 [
file
] [
log
] [
blame
]
#!/bin/sh
header_dir
=
$1
printf
"static const char *kcmp_types[] = {\n"
regex
=
'^[[:space:]]+(KCMP_(\w+)),'
egrep $regex $
{
header_dir
}/
kcmp
.
h
|
grep
-
v KCMP_TYPES
,
|
\
sed
-
r
"s/$regex/\1 \2/g"
|
\
xargs printf
"\t[%s]\t= \"%s\",\n"
printf
"};\n"