[PATCH v3 3/6] scripts: add glimpse.sh for indexing the kernel

From: Luis R. Rodriguez
Date: Tue Jun 14 2016 - 16:23:56 EST


Glimpse is a tool you can use to index the kernel. The tool
was recently open sourced under the ISC license and can be
obtained at:

https://github.com/mcgrof/glimpse.git

Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
---
scripts/glimpse.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100755 scripts/glimpse.sh

diff --git a/scripts/glimpse.sh b/scripts/glimpse.sh
new file mode 100755
index 000000000000..5fd24e49f31b
--- /dev/null
+++ b/scripts/glimpse.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+DIR=$(dirname $(readlink -f $0))
+DIR="${DIR}/../"
+
+GLIMPSEINDEX="`which ${GLIMPSEINDEX:=glimpseindex}`"
+if [ ! -x "$GLIMPSEINDEX" ]; then
+ echo 'glimpseindex can be obtained at https://github.com/mcgrof/glimpse.git'
+ exit 1
+fi
+
+find $DIR/* -name "*.[ch]" | $GLIMPSEINDEX -o -H . -F
--
2.8.2