[PATCH] Script to generate perf-man tarball.
by Miguel A. Flores Silverio
This is a small script that semi automates the creation
of the perf-man pages. This version of the script assumes
LINUX_GIT is set in you local .bashrc file.
Signed-off-by: Miguel Flores Silverio <floresmigu3l(a)gmail.com>
---
scripts/generate-perf-man.sh | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 scripts/generate-perf-man.sh
diff --git a/scripts/generate-perf-man.sh b/scripts/generate-perf-man.sh
new file mode 100644
index 0000000..ef11b53
--- /dev/null
+++ b/scripts/generate-perf-man.sh
@@ -0,0 +1,19 @@
+#! /bin/sh
+source ~/.bashrc # LINUX_GIT is set
+
+if [ ! -d "$LINUX_GIT" ];
+then
+ echo "Error: \$LINUX_GIT is not set to the upstream git tree."
+ exit 1
+fi
+
+BASEDIR=$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)")
+pushd "$LINUX_GIT"
+KERNEL_VERSION=$( awk '/^VERSION =/ {print $3}' Makefile )
+KERNEL_PATCHLEVEL=$( awk '/^PATCHLEVEL =/ {print $3}' Makefile )
+
+cd tools/perf/Documentation/
+make
+tar -czvf $BASEDIR/perf-man-${KERNEL_VERSION}.${KERNEL_PATCHLEVEL}.tar.gz *.1
+make clean
+popd
--
2.7.4