[PATCHv3] Script to generate perf-man tarball

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Miguel Flores Silverio <floresmigu3l@xxxxxxxxx>
---
 scripts/generate-perf-man.sh | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100755 scripts/generate-perf-man.sh

diff --git a/scripts/generate-perf-man.sh b/scripts/generate-perf-man.sh
new file mode 100755
index 0000000..9820568
--- /dev/null
+++ b/scripts/generate-perf-man.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Small script to generate perf-man tarball.
+# The script relies on having LINUX_GIT set in you local .bashrc
+
+if [ -f ~/.bashrc ]; then
+    source ~/.bashrc # LINUX_GIT is set
+fi
+#LINUX_GIT=path/to/linus's/kernel
+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 )
+
+# By defaults the scripts uses the upstream git tree kernel version
+# and patch level. The script will prompt for confirmation of these
+# default values or change them.
+echo "Generating perf-man for ${KERNEL_VERSION}.${KERNEL_PATCHLEVEL}"
+read -p "Would you like to override this? [y/n] " -n 1 -r
+echo
+if [[ $REPLY =~ ^[Yy]$ ]];
+then
+    read -p "Version: " KERNEL_VERSION
+    read -p "Patch Level: " KERNEL_PATCHLEVEL
+fi
+
+cd tools/perf/Documentation/
+make
+tar -czvf $BASEDIR/perf-man-${KERNEL_VERSION}.${KERNEL_PATCHLEVEL}.tar.gz *.1
+make clean
+popd
--
2.7.4
_______________________________________________
kernel mailing list
kernel@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux