[linux-base] 04/05: Add bash completion wrapper for perf (Closes: #702482)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sat Sep 17 00:00:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux-base.

commit 1d1a6fa0a71108465f3010f2733a92886872db68
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sat Sep 17 00:54:39 2016 +0100

    Add bash completion wrapper for perf (Closes: #702482)
---
 bash-completion/perf              | 14 ++++++++++++++
 debian/changelog                  |  1 +
 debian/control                    |  2 +-
 debian/linux-base.bash-completion |  1 +
 debian/rules                      |  2 +-
 5 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/bash-completion/perf b/bash-completion/perf
new file mode 100644
index 0000000..701863f
--- /dev/null
+++ b/bash-completion/perf
@@ -0,0 +1,14 @@
+# perf(1) completion
+
+# Get completions for the right version of perf for the current kernel.
+# Remove flavour or custom suffix and fix number of version components to 2.
+version="$(uname -r)"
+version="${version%%-*}"
+case "$version" in
+    *.*.*)
+	version="${version%.*}"
+	;;
+esac
+if [ -f /usr/share/bash-completion/completions/"perf_$version" ]; then
+    . /usr/share/bash-completion/completions/"perf_$version"
+fi
diff --git a/debian/changelog b/debian/changelog
index 6e01b7f..fb6a4a0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ linux-base (4.5) UNRELEASED; urgency=medium
     (Closes: #837097)
   * perf: Drop support for versions older than 3.2
   * Use dh with debhelper compat level 9
+  * Add bash completion wrapper for perf (Closes: #702482)
 
  -- Salvatore Bonaccorso <carnil at debian.org>  Thu, 14 Jul 2016 19:58:02 +0200
 
diff --git a/debian/control b/debian/control
index a53df98..dc310b7 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Debian Kernel Team <debian-kernel at lists.debian.org>
 Uploaders: Bastian Blank <waldi at debian.org>, Frederik Schüler <fs at debian.org>, maximilian attems <maks at debian.org>, Ben Hutchings <ben at decadent.org.uk>
 Standards-Version: 3.9.8
-Build-Depends: debhelper (>> 9)
+Build-Depends: debhelper (>> 9), bash-completion
 Vcs-Git: https://anonscm.debian.org/git/kernel/linux-base.git
 Vcs-Browser: https://anonscm.debian.org/cgit/kernel/linux-base.git
 
diff --git a/debian/linux-base.bash-completion b/debian/linux-base.bash-completion
new file mode 100644
index 0000000..9036fbe
--- /dev/null
+++ b/debian/linux-base.bash-completion
@@ -0,0 +1 @@
+bash-completion/perf
diff --git a/debian/rules b/debian/rules
index 29714d6..e068658 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 %:
-	dh $@
+	dh $@ --with bash-completion
 
 override_dh_auto_test:
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux-base.git



More information about the Kernel-svn-changes mailing list