]> git.baikalelectronics.ru Git - kernel.git/commitdiff
perf beauty socket: Prep to receive more input header files
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 8 Nov 2021 13:34:06 +0000 (10:34 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 12 Nov 2021 13:40:34 +0000 (10:40 -0300)
Move from ternary like expression to an if block, this way we'll
have just the extra lines for new files in the following patches.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/trace/beauty/socket.sh

index e08a3fb880dd87221eb2174542916d2be2fe52bd..789b3d8c6bcce3ce1dd29f4a509f0993e0aee626 100755 (executable)
@@ -1,7 +1,11 @@
 #!/bin/sh
 # SPDX-License-Identifier: LGPL-2.1
 
-[ $# -eq 1 ] && uapi_header_dir=$1 || uapi_header_dir=tools/include/uapi/linux/
+if [ $# -gt 0 ] ; then
+       uapi_header_dir=$1
+else
+       uapi_header_dir=tools/include/uapi/linux/
+fi
 
 printf "static const char *socket_ipproto[] = {\n"
 regex='^[[:space:]]+IPPROTO_(\w+)[[:space:]]+=[[:space:]]+([[:digit:]]+),.*'