[Bash-completion-commits] ./current r1110: added extra/dh_bash-completion to ease future rewrite of bc.

David Paleino d.paleino at gmail.com
Tue Jun 17 20:28:54 UTC 2008


------------------------------------------------------------
revno: 1110
committer: David Paleino <d.paleino at gmail.com>
branch nick: current
timestamp: Tue 2008-06-17 22:28:54 +0200
message:
  added extra/dh_bash-completion to ease future rewrite of bc.
added:
  extra/
  extra/dh_bash-completion
modified:
  debian/changelog
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog	2008-06-17 20:25:58 +0000
+++ b/debian/changelog	2008-06-17 20:28:54 +0000
@@ -24,6 +24,7 @@
     - added .pdf.bz2 completion to evince (Closes: #424736)
     - added .svg completion to display (Closes: #441017)
     - added .m2ts completion to mplayer (Closes: #480879)
+    - added extra/dh_bash-completion to ease future rewrite of bc.
   * debian/copyright - now in a fancier machine-parsable format.
   * debian/control:
     - added myself to Uploaders
@@ -50,7 +51,7 @@
   * Update apt-get completion to include the flag "--no-install-recommends"
     (Closes: #475242)
 
- -- David Paleino <d.paleino at gmail.com>  Fri, 16 May 2008 17:31:58 +0200
+ -- David Paleino <d.paleino at gmail.com>  Tue, 17 Jun 2008 22:28:07 +0200
 
 bash-completion (20060301-4) unstable; urgency=low
 

=== added directory 'extra'
=== added file 'extra/dh_bash-completion'
--- a/extra/dh_bash-completion	1970-01-01 00:00:00 +0000
+++ b/extra/dh_bash-completion	2008-06-17 20:28:54 +0000
@@ -0,0 +1,57 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_bash-completion - install bash completions for package
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_bash-completion> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_bash-completion is a debhelper program that is responsible for installing
+completions for bash, usable installing the "bash-completion" package.
+
+If a file named debian/package.bash-completion exists, then it is
+installed into etc/bash_completion.d in the package build directory.
+This file is used to provide the user with proper completion for available
+commands.
+
+=cut
+
+init();
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+	next if is_udeb($package);
+
+	my $tmp = tmpdir($package);
+	my $bc_dir = "$tmp/etc/bash_completion.d";
+	my $completions = pkgfile($package,"bash-completion");
+
+	if ($completions ne '') {
+		if (! -d "$bc_dir") {
+			 doit("install", "-d", "$bc_dir");
+		}
+		doit("install", "-p", "-m644", $completions, "$bc_dir/$package");
+	}
+}
+
+=head1 SEE ALSO
+
+L<debhelper(1)>
+
+This program is a part of debhelper.
+
+L<bash(1)>
+
+=head1 AUTHOR
+
+David Paleino <d.paleino at gmail.com>
+
+=cut



More information about the Bash-completion-commits mailing list